Re: [PATCH 2/2] iio: adc: adi-axi-adc: Remove unneeded check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2020-07-01 at 14:04 +0200, Nuno Sá wrote:
> [External]
> 
> Looking at the register path, there will be bigger issues if `dev` is
> NULL. Hence, we can drop this check and assume there's no way that `dev`
> can be NULL at this point.
> 
> Signed-off-by: Nuno Sá <nuno.sa@xxxxxxxxxx>
> ---
>  drivers/iio/adc/adi-axi-adc.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/iio/adc/adi-axi-adc.c b/drivers/iio/adc/adi-axi-
> adc.c
> index 86b6b65916ee..e216e37e8c8c 100644
> --- a/drivers/iio/adc/adi-axi-adc.c
> +++ b/drivers/iio/adc/adi-axi-adc.c
> @@ -326,9 +326,6 @@ static struct adi_axi_adc_client
> *adi_axi_adc_attach_client(struct device *dev)
>  	mutex_lock(&registered_clients_lock);
>  
>  	list_for_each_entry(cl, &registered_clients, entry) {
> -		if (!cl->dev)
> -			continue;
> -

I may need to check this again.
I think this may be a left-over, of when there was un-managed
adi_axi_adc_conv_register()


>  		if (cl->dev->of_node != cln)
>  			continue;
>  




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux