]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/i2c/chips/ds1374.c
[ARM] 4751/1: [AT91] ISI peripheral on SAM9263
[linux-2.6-omap-h63xx.git] / drivers / i2c / chips / ds1374.c
index 15edf40828b479172d615347780f3bb2f2d8ce51..8a2ff0c114d9db7460c3b8177d9dbec2472456fa 100644 (file)
@@ -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);