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/v4l2-common.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/v4l2-common.c')
-rw-r--r-- | drivers/media/video/v4l2-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 32607a612b18..61ebdb0afa12 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -1037,7 +1037,7 @@ int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver | |||
1037 | else { | 1037 | else { |
1038 | kfree(client); | 1038 | kfree(client); |
1039 | } | 1039 | } |
1040 | return err; | 1040 | return err != -ENOMEM ? 0 : err; |
1041 | } | 1041 | } |
1042 | 1042 | ||
1043 | /* ----------------------------------------------------------------- */ | 1043 | /* ----------------------------------------------------------------- */ |