diff options
author | Michael Hunold <devnull@localhost> | 2004-08-18 15:07:22 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2004-08-18 15:07:22 +0000 |
commit | ae4ab53764e8ebafbb861315c59313f820d7712e (patch) | |
tree | a29791f2d271072a5afdc601ec42bc9c017e44b9 | |
parent | a6a90c5b6300a48372cc6c1a7a0a89fd0e534308 (diff) | |
download | mediapointer-dvb-s2-ae4ab53764e8ebafbb861315c59313f820d7712e.tar.gz mediapointer-dvb-s2-ae4ab53764e8ebafbb861315c59313f820d7712e.tar.bz2 |
- don't invent new return codes, but pass through the return code of the function that failed
-rw-r--r-- | linux/drivers/media/dvb/frontends/ves1820.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/frontends/ves1820.c b/linux/drivers/media/dvb/frontends/ves1820.c index 09949c12f..c8c2fdd9b 100644 --- a/linux/drivers/media/dvb/frontends/ves1820.c +++ b/linux/drivers/media/dvb/frontends/ves1820.c @@ -539,14 +539,13 @@ static int attach_adapter(struct i2c_adapter *adapter) return -ENOMEM; } + memset(state, 0, sizeof(*state)); state->i2c = adapter; state->tuner = tuner_type; state->pwm = read_pwm(adapter); state->reg0 = ves1820_inittab[0]; state->demod_addr = demod_addr; - /* todo: honour user pwm setting somehow */ - memcpy(client, &client_template, sizeof(struct i2c_client)); client->adapter = adapter; client->addr = addr[tuner_type]; @@ -557,7 +556,7 @@ static int attach_adapter(struct i2c_adapter *adapter) if (ret) { kfree(client); kfree(state); - return -EFAULT; + return ret; } BUG_ON(!state->dvb); @@ -569,7 +568,7 @@ static int attach_adapter(struct i2c_adapter *adapter) i2c_detach_client(client); kfree(client); kfree(state); - return -EFAULT; + return ret; } return 0; |