Re: [PATCH 1/1] drivers/hid/hid-picolcd_debugfs.c: remove unnecessary NULL test before debugfs_remove

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

 



On Sat, 28 Jun 2014, Fabian Frederick wrote:

> Fix checkpatch warning:
> WARNING: debugfs_remove(NULL) is safe this check is probably not required
> 
> Cc: Jiri Kosina <jkosina@xxxxxxx>
> Cc: linux-input@xxxxxxxxxxxxxxx
> Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
> ---
>  drivers/hid/hid-picolcd_debugfs.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/hid/hid-picolcd_debugfs.c b/drivers/hid/hid-picolcd_debugfs.c
> index 024cdf3..3c13af6 100644
> --- a/drivers/hid/hid-picolcd_debugfs.c
> +++ b/drivers/hid/hid-picolcd_debugfs.c
> @@ -883,16 +883,13 @@ void picolcd_exit_devfs(struct picolcd_data *data)
>  
>  	dent = data->debug_reset;
>  	data->debug_reset = NULL;
> -	if (dent)
> -		debugfs_remove(dent);
> +	debugfs_remove(dent);
>  	dent = data->debug_eeprom;
>  	data->debug_eeprom = NULL;
> -	if (dent)
> -		debugfs_remove(dent);
> +	debugfs_remove(dent);
>  	dent = data->debug_flash;
>  	data->debug_flash = NULL;
> -	if (dent)
> -		debugfs_remove(dent);
> +	debugfs_remove(dent);
>  	mutex_destroy(&data->mutex_flash);
>  }

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux