2014-06-27 20:39:56

by Fabian Frédérick

[permalink] [raw]
Subject: [PATCH 1/1] drivers/input/touchscreen/edt-ft5x06.c: remove unnecessary null test before debugfs_remove_recursive

Fix checkpatch warning:
"WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required"

Cc: Dmitry Torokhov <[email protected]>
Cc: Henrik Rydberg <[email protected]>
Cc: [email protected]
Signed-off-by: Fabian Frederick <[email protected]>
---
drivers/input/touchscreen/edt-ft5x06.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index d4f3399..5a6d50c 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -733,8 +733,7 @@ edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata,
static void
edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata)
{
- if (tsdata->debug_dir)
- debugfs_remove_recursive(tsdata->debug_dir);
+ debugfs_remove_recursive(tsdata->debug_dir);
kfree(tsdata->raw_buffer);
}

--
1.8.4.5


2014-07-09 16:46:56

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH 1/1] drivers/input/touchscreen/edt-ft5x06.c: remove unnecessary null test before debugfs_remove_recursive

On Fri, Jun 27, 2014 at 10:38:32PM +0200, Fabian Frederick wrote:
> Fix checkpatch warning:
> "WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required"
>
> Cc: Dmitry Torokhov <[email protected]>
> Cc: Henrik Rydberg <[email protected]>
> Cc: [email protected]
> Signed-off-by: Fabian Frederick <[email protected]>

Applied, thank you.

> ---
> drivers/input/touchscreen/edt-ft5x06.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
> index d4f3399..5a6d50c 100644
> --- a/drivers/input/touchscreen/edt-ft5x06.c
> +++ b/drivers/input/touchscreen/edt-ft5x06.c
> @@ -733,8 +733,7 @@ edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata,
> static void
> edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata)
> {
> - if (tsdata->debug_dir)
> - debugfs_remove_recursive(tsdata->debug_dir);
> + debugfs_remove_recursive(tsdata->debug_dir);
> kfree(tsdata->raw_buffer);
> }
>
> --
> 1.8.4.5
>

--
Dmitry