diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-09-18 02:22:32 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:01:29 -0500 |
commit | 393bf5573269979aa3fb55d1bdd0db4fcb288f99 (patch) | |
tree | c514bb358342276c57adaa9586e51738630a8df4 | |
parent | a2e521e85c04af3511af3ea8971efb4ef8bde533 (diff) |
V4L/DVB (6467): v4l2-common: minor cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/video/v4l2-common.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 61ebdb0afa12..c056ff6d810c 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -1028,13 +1028,12 @@ int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver | |||
1028 | client->addr = address; | 1028 | client->addr = address; |
1029 | client->adapter = adapter; | 1029 | client->adapter = adapter; |
1030 | client->driver = driver; | 1030 | client->driver = driver; |
1031 | snprintf(client->name, sizeof(client->name) - 1, name); | 1031 | strlcpy(client->name, name, sizeof(client->name)); |
1032 | 1032 | ||
1033 | err = probe(client); | 1033 | err = probe(client); |
1034 | if (err == 0) { | 1034 | if (err == 0) { |
1035 | i2c_attach_client(client); | 1035 | i2c_attach_client(client); |
1036 | } | 1036 | } else { |
1037 | else { | ||
1038 | kfree(client); | 1037 | kfree(client); |
1039 | } | 1038 | } |
1040 | return err != -ENOMEM ? 0 : err; | 1039 | return err != -ENOMEM ? 0 : err; |