diff options
author | Alex Elder <elder@linaro.org> | 2016-05-24 13:34:49 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-05-27 11:28:16 -0700 |
commit | 66394300c37e9321a913f269021b3d6c92d786ad (patch) | |
tree | 207068165730132d4bccfe4c7b6a8d05ac35829e /drivers/staging/greybus/camera.c | |
parent | ebc9e3750d3112e3a84fe65386cb0e5deb994e18 (diff) | |
download | op-kernel-dev-66394300c37e9321a913f269021b3d6c92d786ad.zip op-kernel-dev-66394300c37e9321a913f269021b3d6c92d786ad.tar.gz |
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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c index dda8719..d5496f8 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); } |