Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294996
b: refs/heads/master
c: 0c07aec
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Khoroshilov authored and Mauro Carvalho Chehab committed Mar 8, 2012
1 parent 20e2822 commit a39ab4c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 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: 06302ffbb470359c8cbcf1ee8b057d6930300f90
refs/heads/master: 0c07aec31a98a63ee83f2bbad4a2fab0e0f58d33
16 changes: 10 additions & 6 deletions trunk/drivers/staging/media/go7007/s2250-board.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ static int write_reg_fp(struct i2c_client *client, u16 addr, u16 val)
{
struct go7007 *go = i2c_get_adapdata(client->adapter);
struct go7007_usb *usb;
int rc;
u8 *buf;
struct s2250 *dec = i2c_get_clientdata(client);

Expand All @@ -216,12 +217,13 @@ static int write_reg_fp(struct i2c_client *client, u16 addr, u16 val)
kfree(buf);
return -EINTR;
}
if (go7007_usb_vendor_request(go, 0x57, addr, val, buf, 16, 1) < 0) {
rc = go7007_usb_vendor_request(go, 0x57, addr, val, buf, 16, 1);
mutex_unlock(&usb->i2c_lock);
if (rc < 0) {
kfree(buf);
return -EFAULT;
return rc;
}

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

Expand Down Expand Up @@ -254,6 +256,7 @@ static int read_reg_fp(struct i2c_client *client, u16 addr, u16 *val)
{
struct go7007 *go = i2c_get_adapdata(client->adapter);
struct go7007_usb *usb;
int rc;
u8 *buf;

if (go == NULL)
Expand All @@ -276,11 +279,12 @@ static int read_reg_fp(struct i2c_client *client, u16 addr, u16 *val)
kfree(buf);
return -EINTR;
}
if (go7007_usb_vendor_request(go, 0x58, addr, 0, buf, 16, 1) < 0) {
rc = go7007_usb_vendor_request(go, 0x58, addr, 0, buf, 16, 1);
mutex_unlock(&usb->i2c_lock);
if (rc < 0) {
kfree(buf);
return -EFAULT;
return rc;
}
mutex_unlock(&usb->i2c_lock);

*val = (buf[0] << 8) | buf[1];
kfree(buf);
Expand Down

0 comments on commit a39ab4c

Please sign in to comment.