]> Pileus Git - ~andy/linux/commitdiff
[media] adv7511: fix error return code in adv7511_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 11 Sep 2013 13:07:58 +0000 (10:07 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 3 Oct 2013 17:13:33 +0000 (14:13 -0300)
Fix to return -ENOMEM in the new i2c client and create workqueue error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/i2c/adv7511.c

index 7a576097471f352939cc703d6fbac368cf02f532..b2a11f6cb894e43a1ecd0b55f15731804e4afb21 100644 (file)
@@ -1126,6 +1126,7 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id *
        state->i2c_edid = i2c_new_dummy(client->adapter, state->i2c_edid_addr >> 1);
        if (state->i2c_edid == NULL) {
                v4l2_err(sd, "failed to register edid i2c client\n");
+               err = -ENOMEM;
                goto err_entity;
        }
 
@@ -1133,6 +1134,7 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id *
        state->work_queue = create_singlethread_workqueue(sd->name);
        if (state->work_queue == NULL) {
                v4l2_err(sd, "could not create workqueue\n");
+               err = -ENOMEM;
                goto err_unreg_cec;
        }