Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357231
b: refs/heads/master
c: d58f4f2
h: refs/heads/master
i:
  357229: 5888ce9
  357227: 09d0837
  357223: a4d1ea3
  357215: e87a9d7
v: v3
  • Loading branch information
Rémi Cardona authored and Mauro Carvalho Chehab committed Dec 27, 2012
1 parent b269a7e commit 5b07e07
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e5d74ee116d9622fc4ef9f5100692485ae286cf
refs/heads/master: d58f4f27282e10b25daee53045a7e839bd4178a5
12 changes: 7 additions & 5 deletions trunk/drivers/media/dvb-frontends/ds3000.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,15 +272,14 @@ static int ds3000_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
static int ds3000_writeFW(struct ds3000_state *state, int reg,
const u8 *data, u16 len)
{
int i, ret = -EREMOTEIO;
int i, ret = 0;
struct i2c_msg msg;
u8 *buf;

buf = kmalloc(33, GFP_KERNEL);
if (buf == NULL) {
printk(KERN_ERR "Unable to kmalloc\n");
ret = -ENOMEM;
goto error;
return -ENOMEM;
}

*(buf) = reg;
Expand All @@ -300,8 +299,10 @@ static int ds3000_writeFW(struct ds3000_state *state, int reg,
printk(KERN_ERR "%s: write error(err == %i, "
"reg == 0x%02x\n", __func__, ret, reg);
ret = -EREMOTEIO;
goto error;
}
}
ret = 0;

error:
kfree(buf);
Expand Down Expand Up @@ -384,6 +385,7 @@ static int ds3000_load_firmware(struct dvb_frontend *fe,
const struct firmware *fw)
{
struct ds3000_state *state = fe->demodulator_priv;
int ret = 0;

dprintk("%s\n", __func__);
dprintk("Firmware is %zu bytes (%02x %02x .. %02x %02x)\n",
Expand All @@ -396,10 +398,10 @@ static int ds3000_load_firmware(struct dvb_frontend *fe,
/* Begin the firmware load process */
ds3000_writereg(state, 0xb2, 0x01);
/* write the entire firmware */
ds3000_writeFW(state, 0xb0, fw->data, fw->size);
ret = ds3000_writeFW(state, 0xb0, fw->data, fw->size);
ds3000_writereg(state, 0xb2, 0x00);

return 0;
return ret;
}

static int ds3000_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
Expand Down

0 comments on commit 5b07e07

Please sign in to comment.