lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <69fe77a4-d9fd-83b4-7821-f0a3c13d737f@gmail.com>
Date:	Mon, 25 Jul 2016 10:43:32 +0200
From:	Matthias Brugger <matthias.bgg@...il.com>
To:	SF Markus Elfring <elfring@...rs.sourceforge.net>,
	dri-devel@...ts.freedesktop.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org, CK Hu <ck.hu@...iatek.com>,
	Daniel Vetter <daniel@...ll.ch>,
	David Airlie <airlied@...ux.ie>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH] GPU-DRM: Delete an unnecessary check before
 drm_property_unreference_blob()



On 22/07/16 12:56, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Fri, 22 Jul 2016 12:48:12 +0200
>
> The drm_property_unreference_blob() function tests whether its argument
> is NULL and then returns immediately.
> Thus the test around the call is not needed.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
>  drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>

Reviewed-by: Matthias Brugger <matthias.bgg@...il.com>

> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> index 24aa3ba..07541d0 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> @@ -112,9 +112,7 @@ static void mtk_drm_crtc_reset(struct drm_crtc *crtc)
>  	struct mtk_crtc_state *state;
>
>  	if (crtc->state) {
> -		if (crtc->state->mode_blob)
> -			drm_property_unreference_blob(crtc->state->mode_blob);
> -
> +		drm_property_unreference_blob(crtc->state->mode_blob);
>  		state = to_mtk_crtc_state(crtc->state);
>  		memset(state, 0, sizeof(*state));
>  	} else {
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ