* [PATCH] drivers/fmc: remove unneeded NULL check
@ 2019-03-28 9:23 Ding Xiang
2019-03-28 10:22 ` Mukesh Ojha
0 siblings, 1 reply; 2+ messages in thread
From: Ding Xiang @ 2019-03-28 9:23 UTC (permalink / raw)
To: rubini, linux-kernel
The variable will check in debugfs_remove_recursive, so
the NULL check here is not needed
Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
---
drivers/fmc/fmc-debug.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/fmc/fmc-debug.c b/drivers/fmc/fmc-debug.c
index 3293072..ab868a3 100644
--- a/drivers/fmc/fmc-debug.c
+++ b/drivers/fmc/fmc-debug.c
@@ -168,6 +168,5 @@ int fmc_debug_init(struct fmc_device *fmc)
void fmc_debug_exit(struct fmc_device *fmc)
{
- if (fmc->dbg_dir)
- debugfs_remove_recursive(fmc->dbg_dir);
+ debugfs_remove_recursive(fmc->dbg_dir);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers/fmc: remove unneeded NULL check
2019-03-28 9:23 [PATCH] drivers/fmc: remove unneeded NULL check Ding Xiang
@ 2019-03-28 10:22 ` Mukesh Ojha
0 siblings, 0 replies; 2+ messages in thread
From: Mukesh Ojha @ 2019-03-28 10:22 UTC (permalink / raw)
To: Ding Xiang, rubini, linux-kernel
On 3/28/2019 2:53 PM, Ding Xiang wrote:
> The variable will check in debugfs_remove_recursive, so
> the NULL check here is not needed
>
> Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
-Mukesh
> ---
> drivers/fmc/fmc-debug.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/fmc/fmc-debug.c b/drivers/fmc/fmc-debug.c
> index 3293072..ab868a3 100644
> --- a/drivers/fmc/fmc-debug.c
> +++ b/drivers/fmc/fmc-debug.c
> @@ -168,6 +168,5 @@ int fmc_debug_init(struct fmc_device *fmc)
>
> void fmc_debug_exit(struct fmc_device *fmc)
> {
> - if (fmc->dbg_dir)
> - debugfs_remove_recursive(fmc->dbg_dir);
> + debugfs_remove_recursive(fmc->dbg_dir);
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-28 10:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 9:23 [PATCH] drivers/fmc: remove unneeded NULL check Ding Xiang
2019-03-28 10:22 ` Mukesh Ojha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).