V4L/DVB (6467): v4l2-common: minor cleanups

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
Hans Verkuil 2007-09-18 03:22:32 -03:00 committed by Mauro Carvalho Chehab
parent a2e521e85c
commit 393bf55732
1 changed files with 2 additions and 3 deletions

View File

@ -1028,13 +1028,12 @@ int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver
client->addr = address;
client->adapter = adapter;
client->driver = driver;
snprintf(client->name, sizeof(client->name) - 1, name);
strlcpy(client->name, name, sizeof(client->name));
err = probe(client);
if (err == 0) {
i2c_attach_client(client);
}
else {
} else {
kfree(client);
}
return err != -ENOMEM ? 0 : err;