projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ebb52d
)
i2c-dev: Return correct error code on class_create() failure
author
Sven Wegener
<sven.wegener@stealer.net>
Wed, 24 Sep 2008 11:39:21 +0000
(13:39 +0200)
committer
Jean Delvare
<khali@mahadeva.delvare>
Wed, 24 Sep 2008 11:39:21 +0000
(13:39 +0200)
We need to convert the error pointer from class_create(), else we'll return the
successful return code from register_chrdev() on failure.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/i2c-dev.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/i2c/i2c-dev.c
b/drivers/i2c/i2c-dev.c
index af4491fa7e347c3059b50d6bf68d509cdb24ea5b..307d976c9b69b977c389e62abfbe43682b1d3e24 100644
(file)
--- a/
drivers/i2c/i2c-dev.c
+++ b/
drivers/i2c/i2c-dev.c
@@
-583,8
+583,10
@@
static int __init i2c_dev_init(void)
goto out;
i2c_dev_class = class_create(THIS_MODULE, "i2c-dev");
- if (IS_ERR(i2c_dev_class))
+ if (IS_ERR(i2c_dev_class)) {
+ res = PTR_ERR(i2c_dev_class);
goto out_unreg_chrdev;
+ }
res = i2c_add_driver(&i2cdev_driver);
if (res)