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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 8 Dec 2020 08:58:39 +0100
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Tian Tao <tiantao6@...ilicon.com>,
        maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
        airlied@...ux.ie, daniel@...ll.ch
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/drv: switch to using devm_add_action_or_reset()



Am 07.12.20 um 02:04 schrieb Tian Tao:
> switch to using devm_add_action_or_reset() instead of devm_add_action.
> 
> Signed-off-by: Tian Tao <tiantao6@...ilicon.com>

I'm surprised that devm_drm_dev_init() didn't already use 
devm_add_action_or_reset(). But it doesn't look special, so

Acked-by: Thomas Zimmermann <tzimmermann@...e.de>

> ---
>   drivers/gpu/drm/drm_drv.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 7343038..b92f7fd 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -675,11 +675,8 @@ static int devm_drm_dev_init(struct device *parent,
>   	if (ret)
>   		return ret;
>   
> -	ret = devm_add_action(parent, devm_drm_dev_init_release, dev);
> -	if (ret)
> -		devm_drm_dev_init_release(dev);
> -
> -	return ret;
> +	return devm_add_action_or_reset(parent,
> +					devm_drm_dev_init_release, dev);
>   }
>   
>   void *__devm_drm_dev_alloc(struct device *parent,
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer



Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists