Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282212
b: refs/heads/master
c: 7b9bb6d
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown authored and Wim Van Sebroeck committed Jan 6, 2012
1 parent 9f117dd commit 18f8b75
Show file tree
Hide file tree
Showing 2 changed files with 4 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: ff0b3cd4a416bc727b0797b95b229b278d2a28f2
refs/heads/master: 7b9bb6d8cfe80580329318caf6c3a137762ecea3
7 changes: 3 additions & 4 deletions trunk/drivers/watchdog/wm831x_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ static int __devinit wm831x_wdt_probe(struct platform_device *pdev)
if (reg & WM831X_WDOG_DEBUG)
dev_warn(wm831x->dev, "Watchdog is paused\n");

driver_data = kzalloc(sizeof(*driver_data), GFP_KERNEL);
driver_data = devm_kzalloc(&pdev->dev, sizeof(*driver_data),
GFP_KERNEL);
if (!driver_data) {
dev_err(wm831x->dev, "Unable to alloacate watchdog device\n");
ret = -ENOMEM;
Expand Down Expand Up @@ -250,7 +251,7 @@ static int __devinit wm831x_wdt_probe(struct platform_device *pdev)
dev_err(wm831x->dev,
"Failed to request update GPIO: %d\n",
ret);
goto err_alloc;
goto err;
}

ret = gpio_direction_output(pdata->update_gpio, 0);
Expand Down Expand Up @@ -292,8 +293,6 @@ static int __devinit wm831x_wdt_probe(struct platform_device *pdev)
err_gpio:
if (driver_data->update_gpio)
gpio_free(driver_data->update_gpio);
err_alloc:
kfree(driver_data);
err:
return ret;
}
Expand Down

0 comments on commit 18f8b75

Please sign in to comment.