Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155370
b: refs/heads/master
c: ca157c4
h: refs/heads/master
v: v3
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Jul 12, 2009
1 parent e975bee commit e8c61de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 45e83889eb291714d3a4727e98e2488074affbf8
refs/heads/master: ca157c4a51fa6209f28c316f4a63d594adb79518
10 changes: 6 additions & 4 deletions trunk/drivers/usb/class/usbtmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ static int get_capabilities(struct usbtmc_device_data *data)
{
struct device *dev = &data->usb_dev->dev;
char *buffer;
int rv;
int rv = 0;

buffer = kmalloc(0x18, GFP_KERNEL);
if (!buffer)
Expand All @@ -763,7 +763,7 @@ static int get_capabilities(struct usbtmc_device_data *data)
0, 0, buffer, 0x18, USBTMC_TIMEOUT);
if (rv < 0) {
dev_err(dev, "usb_control_msg returned %d\n", rv);
return rv;
goto err_out;
}

dev_dbg(dev, "GET_CAPABILITIES returned %x\n", buffer[0]);
Expand All @@ -773,16 +773,18 @@ static int get_capabilities(struct usbtmc_device_data *data)
dev_dbg(dev, "USB488 device capabilities are %x\n", buffer[15]);
if (buffer[0] != USBTMC_STATUS_SUCCESS) {
dev_err(dev, "GET_CAPABILITIES returned %x\n", buffer[0]);
return -EPERM;
rv = -EPERM;
goto err_out;
}

data->capabilities.interface_capabilities = buffer[4];
data->capabilities.device_capabilities = buffer[5];
data->capabilities.usb488_interface_capabilities = buffer[14];
data->capabilities.usb488_device_capabilities = buffer[15];

err_out:
kfree(buffer);
return 0;
return rv;
}

#define capability_attribute(name) \
Expand Down

0 comments on commit e8c61de

Please sign in to comment.