diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-09-11 09:07:58 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-10-14 05:36:44 -0400 |
commit | f527b17ace6794ec732b43be1e00c94da690d7d3 (patch) | |
tree | afe375a35684faec549100125c0c9633006c609e | |
parent | 83291f78362bb3aac25068c07c13b43fa341d38d (diff) |
[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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-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 cc3880a1157c..7c8d971f1f61 100644 --- a/drivers/media/i2c/adv7511.c +++ b/drivers/media/i2c/adv7511.c | |||
@@ -1124,6 +1124,7 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id * | |||
1124 | state->i2c_edid = i2c_new_dummy(client->adapter, state->i2c_edid_addr >> 1); | 1124 | state->i2c_edid = i2c_new_dummy(client->adapter, state->i2c_edid_addr >> 1); |
1125 | if (state->i2c_edid == NULL) { | 1125 | if (state->i2c_edid == NULL) { |
1126 | v4l2_err(sd, "failed to register edid i2c client\n"); | 1126 | v4l2_err(sd, "failed to register edid i2c client\n"); |
1127 | err = -ENOMEM; | ||
1127 | goto err_entity; | 1128 | goto err_entity; |
1128 | } | 1129 | } |
1129 | 1130 | ||
@@ -1131,6 +1132,7 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id * | |||
1131 | state->work_queue = create_singlethread_workqueue(sd->name); | 1132 | state->work_queue = create_singlethread_workqueue(sd->name); |
1132 | if (state->work_queue == NULL) { | 1133 | if (state->work_queue == NULL) { |
1133 | v4l2_err(sd, "could not create workqueue\n"); | 1134 | v4l2_err(sd, "could not create workqueue\n"); |
1135 | err = -ENOMEM; | ||
1134 | goto err_unreg_cec; | 1136 | goto err_unreg_cec; |
1135 | } | 1137 | } |
1136 | 1138 | ||