Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354565
b: refs/heads/master
c: 7a8ea7e
h: refs/heads/master
i:
  354563: 1377b8b
v: v3
  • Loading branch information
Dongjin Kim authored and Greg Kroah-Hartman committed Jan 17, 2013
1 parent c0ef0ca commit ae1fc1c
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 74ff31b81d94c139882258e9e4a73aca28d05b0a
refs/heads/master: 7a8ea7ebe4cf698918e7d3c860587e815eaa0f28
9 changes: 5 additions & 4 deletions trunk/drivers/usb/misc/usb3503.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,19 +182,20 @@ static int usb3503_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
{
struct usb3503_platform_data *pdata = i2c->dev.platform_data;
struct usb3503 *hub;
int err;
int err = -ENOMEM;

hub = kzalloc(sizeof(struct usb3503), GFP_KERNEL);
if (!hub) {
dev_err(&i2c->dev, "private data alloc fail\n");
return -ENOMEM;
return err;
}

i2c_set_clientdata(i2c, hub);
hub->client = i2c;

if (!pdata) {
dev_dbg(&i2c->dev, "missing platform data\n");
goto err_out;
} else {
hub->gpio_intn = pdata->gpio_intn;
hub->gpio_connect = pdata->gpio_connect;
Expand All @@ -209,7 +210,7 @@ static int usb3503_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
dev_err(&i2c->dev,
"unable to request GPIO %d as connect pin (%d)\n",
hub->gpio_intn, err);
goto err_gpio_intn;
goto err_out;
}
}

Expand Down Expand Up @@ -248,7 +249,7 @@ static int usb3503_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
err_gpio_connect:
if (gpio_is_valid(hub->gpio_intn))
gpio_free(hub->gpio_intn);
err_gpio_intn:
err_out:
kfree(hub);

return err;
Expand Down

0 comments on commit ae1fc1c

Please sign in to comment.