lkml.org 
[lkml]   [2014]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] drivers/hid/hid-picolcd_debugfs.c: remove unnecessary NULL test before debugfs_remove
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@suse.cz>
> Cc: linux-input@vger.kernel.org
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> 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


\
 
 \ /
  Last update: 2014-06-30 10:21    [W:0.036 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site