summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/camera.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2016-05-24 13:34:49 -0500
committerGreg Kroah-Hartman <gregkh@google.com>2016-05-27 11:28:16 -0700
commit66394300c37e9321a913f269021b3d6c92d786ad (patch)
tree207068165730132d4bccfe4c7b6a8d05ac35829e /drivers/staging/greybus/camera.c
parentebc9e3750d3112e3a84fe65386cb0e5deb994e18 (diff)
downloadlinux-66394300c37e9321a913f269021b3d6c92d786ad.tar.bz2
greybus: eliminate unneeded null check
Coccinelle points out that debugfs_remove_recursive() handles a null argument properly, so there's no need to check for NULL before making the call. I have verified this is true of the kernel we're now working with (arche-6.0). Signed-off-by: Alex Elder <elder@linaro.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/camera.c')
-rw-r--r--drivers/staging/greybus/camera.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
index dda871912c10..d5496f8a7b89 100644
--- a/drivers/staging/greybus/camera.c
+++ b/drivers/staging/greybus/camera.c
@@ -883,8 +883,7 @@ static int gb_camera_debugfs_init(struct gb_camera *gcam)
static void gb_camera_debugfs_cleanup(struct gb_camera *gcam)
{
- if (gcam->debugfs.root)
- debugfs_remove_recursive(gcam->debugfs.root);
+ debugfs_remove_recursive(gcam->debugfs.root);
vfree(gcam->debugfs.buffers);
}