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:
parent
a2e521e85c
commit
393bf55732
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue