projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5aaea3
)
i2c/ds1374: Check workqueue creation status
author
Cyrill V. Gorcunov
<
[email protected]
>
Thu, 22 Mar 2007 18:49:01 +0000
(19:49 +0100)
committer
Jean Delvare
<
[email protected]
>
Thu, 22 Mar 2007 18:49:01 +0000
(19:49 +0100)
Check if workqueue creation failed. Further usage of NULL pointed
workqueue is not good I guess ;)
Signed-off-by: Cyrill V. Gorcunov <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Jean Delvare <
[email protected]
>
drivers/i2c/chips/ds1374.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/chips/ds1374.c
b/drivers/i2c/chips/ds1374.c
index 15edf40828b479172d615347780f3bb2f2d8ce51..8a2ff0c114d9db7460c3b8177d9dbec2472456fa 100644
(file)
--- a/
drivers/i2c/chips/ds1374.c
+++ b/
drivers/i2c/chips/ds1374.c
@@
-207,6
+207,10
@@
static int ds1374_probe(struct i2c_adapter *adap, int addr, int kind)
client->driver = &ds1374_driver;
ds1374_workqueue = create_singlethread_workqueue("ds1374");
+ if (!ds1374_workqueue) {
+ kfree(client);
+ return -ENOMEM; /* most expected reason */
+ }
if ((rc = i2c_attach_client(client)) != 0) {
kfree(client);