Commit 66394300 authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman
Browse files

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: default avatarAlex Elder <elder@linaro.org>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent ebc9e375
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -883,7 +883,6 @@ 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);

	vfree(gcam->debugfs.buffers);