git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
i2c-dev: Return correct error code on class_create() failure
[pandora-kernel.git]
/
drivers
/
i2c
/
i2c-dev.c
diff --git
a/drivers/i2c/i2c-dev.c
b/drivers/i2c/i2c-dev.c
index
af4491f
..
307d976
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)