diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-09-11 17:07:58 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-10-03 21:13:33 +0400 |
commit | 8510ae4e57b74f5da4a2d98508689ede569c8221 (patch) | |
tree | 41355c0d989bde9c27df404937be4113498e63ec /drivers/media/i2c | |
parent | d8c279a00ba42f7face4bbf959c31d24e5e5baa4 (diff) | |
download | linux-8510ae4e57b74f5da4a2d98508689ede569c8221.tar.xz |
[media] adv7511: fix error return code in adv7511_probe()
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>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/adv7511.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/i2c/adv7511.c b/drivers/media/i2c/adv7511.c index 7a576097471f..b2a11f6cb894 100644 --- a/drivers/media/i2c/adv7511.c +++ b/drivers/media/i2c/adv7511.c @@ -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; } |