]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
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 dd482bd94637181aa12a2fbe50facb21771a1ea7..dda871912c10869cf39130cadaf287ad756571dd 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);
                }
        }