From: Fabian Frederick Date: Sat, 28 Jun 2014 13:35:03 +0000 (+0200) Subject: HID: picolcd: remove unnecessary NULL test before debugfs_remove X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ff2019456d745d4ebc1307eba128393a39790217;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git HID: picolcd: remove unnecessary NULL test before debugfs_remove Fix checkpatch warning: WARNING: debugfs_remove(NULL) is safe this check is probably not required Signed-off-by: Fabian Frederick Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-picolcd_debugfs.c b/drivers/hid/hid-picolcd_debugfs.c index 024cdf3c2297..3c13af684410 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); }