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: <20130912151035.GL11227@lee--X1>
Date:	Thu, 12 Sep 2013 16:10:35 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	Jingoo Han <jg1.han@...sung.com>
Cc:	'Samuel Ortiz' <sameo@...ux.intel.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] mfd: timberdale: remove unnecessary pci_set_drvdata()

On Thu, 12 Sep 2013, Jingoo Han wrote:

> The driver core clears the driver data to NULL after device_release
> or on probe failure. Thus, it is not needed to manually clear the
> device driver data to NULL.
> 
> Signed-off-by: Jingoo Han <jg1.han@...sung.com>
> ---
>  drivers/mfd/timberdale.c |    3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
> index a6755ec..084767b 100644
> --- a/drivers/mfd/timberdale.c
> +++ b/drivers/mfd/timberdale.c
> @@ -829,12 +829,10 @@ err_config:
>  err_ioremap:
>  	release_mem_region(priv->ctl_mapbase, CHIPCTLSIZE);
>  err_request:
> -	pci_set_drvdata(dev, NULL);

So now err_request is redundant.

Can you clean that up in this patch also please?

>  err_start:
>  	pci_disable_device(dev);
>  err_enable:
>  	kfree(priv);
> -	pci_set_drvdata(dev, NULL);
>  	return -ENODEV;
>  }
>  
> @@ -851,7 +849,6 @@ static void timb_remove(struct pci_dev *dev)
>  
>  	pci_disable_msix(dev);
>  	pci_disable_device(dev);
> -	pci_set_drvdata(dev, NULL);
>  	kfree(priv);
>  }
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ