diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-09-16 09:47:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:01:27 -0500 |
commit | 188f3457c21ac7869005021b56b4578293c644bb (patch) | |
tree | 7002562a01698d2fa6070f1547e609f9b29cb163 /drivers/media/video/msp3400-driver.c | |
parent | 6235168db8ed96c587e566be0dd72a77ca212693 (diff) |
V4L/DVB (6465): Use correct error codes when chip is not recognized
If the chip isn't recognized, then the correct errors should be returned.
The v4l2_i2c_attach() utility function will return 0 for all errors
except -ENOMEM to provide proper compatibility support for the old I2C
probing function.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/msp3400-driver.c')
-rw-r--r-- | drivers/media/video/msp3400-driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index f2946aca1299..f4c14604b0b9 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c | |||
@@ -812,7 +812,7 @@ static int msp_probe(struct i2c_client *client) | |||
812 | 812 | ||
813 | if (msp_reset(client) == -1) { | 813 | if (msp_reset(client) == -1) { |
814 | v4l_dbg(1, msp_debug, client, "msp3400 not found\n"); | 814 | v4l_dbg(1, msp_debug, client, "msp3400 not found\n"); |
815 | return 0; | 815 | return -ENODEV; |
816 | } | 816 | } |
817 | 817 | ||
818 | state = kzalloc(sizeof(*state), GFP_KERNEL); | 818 | state = kzalloc(sizeof(*state), GFP_KERNEL); |
@@ -844,7 +844,7 @@ static int msp_probe(struct i2c_client *client) | |||
844 | if (state->rev1 == -1 || (state->rev1 == 0 && state->rev2 == 0)) { | 844 | if (state->rev1 == -1 || (state->rev1 == 0 && state->rev2 == 0)) { |
845 | v4l_dbg(1, msp_debug, client, "not an msp3400 (cannot read chip version)\n"); | 845 | v4l_dbg(1, msp_debug, client, "not an msp3400 (cannot read chip version)\n"); |
846 | kfree(state); | 846 | kfree(state); |
847 | return 0; | 847 | return -ENODEV; |
848 | } | 848 | } |
849 | 849 | ||
850 | msp_set_audio(client); | 850 | msp_set_audio(client); |