Input: edt-ft5x06 - no need to check return value of debugfs_create functions
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Aug 2019 07:05:21 +0000 (00:05 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 12 Aug 2019 07:10:58 +0000 (00:10 -0700)
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/edt-ft5x06.c

index 3cc4341bbdff6e5ae8305b237331a27f98816ec5..5525f1fb1526e1658a19b712cc871ae4a9bbc44a 100644 (file)
@@ -764,8 +764,6 @@ edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata,
                              const char *debugfs_name)
 {
        tsdata->debug_dir = debugfs_create_dir(debugfs_name, NULL);
-       if (!tsdata->debug_dir)
-               return;
 
        debugfs_create_u16("num_x", S_IRUSR, tsdata->debug_dir, &tsdata->num_x);
        debugfs_create_u16("num_y", S_IRUSR, tsdata->debug_dir, &tsdata->num_y);