greybus: report right error value
authorAlex Elder <elder@linaro.org>
Tue, 24 May 2016 18:34:47 +0000 (13:34 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 27 May 2016 18:28:16 +0000 (11:28 -0700)
Running "make coccicheck" on the Greybus code discovered that
an error message in gb_camera_debugfs_init() was interpreting
the wrong value in reporting the error code.  Fix that.

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>
drivers/staging/greybus/camera.c

index dd482bd..dda8719 100644 (file)
@@ -873,7 +873,7 @@ static int gb_camera_debugfs_init(struct gb_camera *gcam)
                if (IS_ERR(dentry)) {
                        gcam_err(gcam,
                                 "debugfs operation %s create failed (%ld)\n",
-                                entry->name, PTR_ERR(gcam->debugfs.root));
+                                entry->name, PTR_ERR(dentry));
                        return PTR_ERR(dentry);
                }
        }