Commit 393bf557 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

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

Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent a2e521e8
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment