Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365686
b: refs/heads/master
c: 0f64f85
h: refs/heads/master
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Apr 30, 2013
1 parent 37779fc commit 9a084be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 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: f5b1d3c5d022aeb994f94ed3372102e057925c6a
refs/heads/master: 0f64f853fc622a0b0c7ab255f8605ae40aa45d84
9 changes: 2 additions & 7 deletions trunk/drivers/rtc/rtc-max77686.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,8 @@ static int max77686_rtc_probe(struct platform_device *pdev)

dev_info(&pdev->dev, "%s\n", __func__);

info = kzalloc(sizeof(struct max77686_rtc_info), GFP_KERNEL);
info = devm_kzalloc(&pdev->dev, sizeof(struct max77686_rtc_info),
GFP_KERNEL);
if (!info)
return -ENOMEM;

Expand All @@ -519,7 +520,6 @@ static int max77686_rtc_probe(struct platform_device *pdev)
ret = PTR_ERR(info->max77686->rtc_regmap);
dev_err(info->max77686->dev, "Failed to allocate register map: %d\n",
ret);
kfree(info);
return ret;
}
platform_set_drvdata(pdev, info);
Expand Down Expand Up @@ -563,11 +563,7 @@ static int max77686_rtc_probe(struct platform_device *pdev)
goto err_rtc;
}

goto out;
err_rtc:
kfree(info);
return ret;
out:
return ret;
}

Expand All @@ -578,7 +574,6 @@ static int max77686_rtc_remove(struct platform_device *pdev)
if (info) {
free_irq(info->virq, info);
rtc_device_unregister(info->rtc_dev);
kfree(info);
}

return 0;
Expand Down

0 comments on commit 9a084be

Please sign in to comment.