9
0
Fork 0

i2c: Add missing result check

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-05-20 21:55:43 +02:00
parent 19bc427e44
commit 05753b98c0
1 changed files with 4 additions and 0 deletions

View File

@ -260,6 +260,10 @@ struct i2c_client *i2c_new_device(struct i2c_adapter *adapter,
client->dev.parent = &adapter->dev;
status = register_device(&client->dev);
if (status) {
free(client);
return NULL;
}
#if 0
/* drivers may modify this initial i/o setup */