Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164279
b: refs/heads/master
c: d66ddf2
h: refs/heads/master
i:
  164277: 10ef9d5
  164275: 3aa7779
  164271: 039f0a0
v: v3
  • Loading branch information
Pete Eberlein authored and Mauro Carvalho Chehab committed Sep 19, 2009
1 parent 9bc5ae7 commit 3112dea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: bb871652d9523d5be811c0c36b04c05c4ac37f92
refs/heads/master: d66ddf21723146a69915a0cf46db77f409e74602
10 changes: 8 additions & 2 deletions trunk/drivers/staging/go7007/s2250-board.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,21 @@ static int write_reg_fp(struct i2c_client *client, u16 addr, u16 val)
usb = go->hpi_context;
if (mutex_lock_interruptible(&usb->i2c_lock) != 0) {
printk(KERN_INFO "i2c lock failed\n");
kfree(buf);
return -EINTR;
}
if (go7007_usb_vendor_request(go, 0x57, addr, val, buf, 16, 1) < 0)
if (go7007_usb_vendor_request(go, 0x57, addr, val, buf, 16, 1) < 0) {
kfree(buf);
return -EFAULT;
}

mutex_unlock(&usb->i2c_lock);
if (buf[0] == 0) {
unsigned int subaddr, val_read;

subaddr = (buf[4] << 8) + buf[5];
val_read = (buf[2] << 8) + buf[3];
kfree(buf);
if (val_read != val) {
printk(KERN_INFO "invalid fp write %x %x\n",
val_read, val);
Expand All @@ -224,8 +228,10 @@ static int write_reg_fp(struct i2c_client *client, u16 addr, u16 val)
subaddr, addr);
return -EFAULT;
}
} else
} else {
kfree(buf);
return -EFAULT;
}

/* save last 12b value */
if (addr == 0x12b)
Expand Down

0 comments on commit 3112dea

Please sign in to comment.