summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tveeprom.c
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2005-01-17 12:38:11 +0000
committerGerd Knorr <devnull@localhost>2005-01-17 12:38:11 +0000
commit9a05e073d8551b8f44c63031b039aaa5cc01e3b9 (patch)
tree4051627804d186b2a3fa58f72f9bbd6853558af6 /linux/drivers/media/video/tveeprom.c
parent49ee5355f240b409e6e7fc547da28c28746e870a (diff)
downloadmediapointer-dvb-s2-9a05e073d8551b8f44c63031b039aaa5cc01e3b9.tar.gz
mediapointer-dvb-s2-9a05e073d8551b8f44c63031b039aaa5cc01e3b9.tar.bz2
- fix tveeprom.
Diffstat (limited to 'linux/drivers/media/video/tveeprom.c')
-rw-r--r--linux/drivers/media/video/tveeprom.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/drivers/media/video/tveeprom.c b/linux/drivers/media/video/tveeprom.c
index 9c3638c18..d4448de13 100644
--- a/linux/drivers/media/video/tveeprom.c
+++ b/linux/drivers/media/video/tveeprom.c
@@ -515,7 +515,7 @@ tveeprom_detect_client(struct i2c_adapter *adapter,
dprintk(1,"%s: id 0x%x @ 0x%x\n",__FUNCTION__,
adapter->id, address << 1);
client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
- if (client == 0)
+ if (NULL == client)
return -ENOMEM;
memset(client, 0, sizeof(struct i2c_client));
client->addr = address;
@@ -523,6 +523,7 @@ tveeprom_detect_client(struct i2c_adapter *adapter,
client->driver = &i2c_driver_tveeprom;
client->flags = I2C_CLIENT_ALLOW_USE;
snprintf(client->name, sizeof(client->name), "tveeprom");
+ i2c_attach_client(client);
return 0;
}
@@ -541,9 +542,8 @@ tveeprom_detach_client (struct i2c_client *client)
int err;
err = i2c_detach_client(client);
- if (err)
+ if (err < 0)
return err;
-
kfree(client);
return 0;
}