Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308964
b: refs/heads/master
c: f072c89
h: refs/heads/master
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed May 29, 2012
1 parent edbed4c commit 32bf518
Show file tree
Hide file tree
Showing 2 changed files with 6 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: d073adc5caf03a928a230baf2d8a86b1f9a03710
refs/heads/master: f072c8900c11bc91eb3fa9287bab4ce606632be5
11 changes: 5 additions & 6 deletions trunk/drivers/video/backlight/tosa_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ static int __devinit tosa_bl_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct backlight_properties props;
struct tosa_bl_data *data = kzalloc(sizeof(struct tosa_bl_data), GFP_KERNEL);
struct tosa_bl_data *data;
int ret = 0;

data = devm_kzalloc(&client->dev, sizeof(struct tosa_bl_data),
GFP_KERNEL);
if (!data)
return -ENOMEM;

Expand All @@ -92,7 +95,7 @@ static int __devinit tosa_bl_probe(struct i2c_client *client,
ret = gpio_request(TOSA_GPIO_BL_C20MA, "backlight");
if (ret) {
dev_dbg(&data->bl->dev, "Unable to request gpio!\n");
goto err_gpio_bl;
return ret;
}
ret = gpio_direction_output(TOSA_GPIO_BL_C20MA, 0);
if (ret)
Expand Down Expand Up @@ -122,8 +125,6 @@ static int __devinit tosa_bl_probe(struct i2c_client *client,
data->bl = NULL;
err_gpio_dir:
gpio_free(TOSA_GPIO_BL_C20MA);
err_gpio_bl:
kfree(data);
return ret;
}

Expand All @@ -136,8 +137,6 @@ static int __devexit tosa_bl_remove(struct i2c_client *client)

gpio_free(TOSA_GPIO_BL_C20MA);

kfree(data);

return 0;
}

Expand Down

0 comments on commit 32bf518

Please sign in to comment.