From 7698fbd817af0fab3a1c3fafab143453de0c9bb8 Mon Sep 17 00:00:00 2001 From: Johannes Stezenbach Date: Sun, 13 Jun 2004 16:40:17 +0000 Subject: fix Oops when the bloody i2c eeprom driver probes the DVB I2C bus --- linux/drivers/media/dvb/b2c2/skystar2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media/dvb/b2c2') diff --git a/linux/drivers/media/dvb/b2c2/skystar2.c b/linux/drivers/media/dvb/b2c2/skystar2.c index bbb3e4506..d2a2bf350 100644 --- a/linux/drivers/media/dvb/b2c2/skystar2.c +++ b/linux/drivers/media/dvb/b2c2/skystar2.c @@ -2238,7 +2238,9 @@ int client_register(struct i2c_client *client) dprintk("client_register\n"); - return client->driver->command(client, FE_REGISTER, adapter->dvb_adapter); + if (client->driver->command) + return client->driver->command(client, FE_REGISTER, adapter->dvb_adapter); + return 0; } int client_unregister(struct i2c_client *client) @@ -2247,7 +2249,9 @@ int client_unregister(struct i2c_client *client) dprintk("client_unregister\n"); - return client->driver->command(client, FE_UNREGISTER, adapter->dvb_adapter); + if (client->driver->command) + return client->driver->command(client, FE_UNREGISTER, adapter->dvb_adapter); + return 0; } static int flexcop_i2c_xfer(struct i2c_adapter *i2c_adapter, struct i2c_msg msg[], int num) -- cgit v1.2.3