Commit 66be0e5b authored by Julia Lawall's avatar Julia Lawall Committed by Linus Torvalds

drivers/video/backlight/da9052_bl.c: drop devm_kfree of devm_kzalloc'd data

devm_kfree should not have to be explicitly used.

The semantic patch that fixes this problem is as follows:

// <smpl>
expression x,d;

x = devm_kzalloc(...)
// </smpl>
Signed-off-by: default avatarJulia Lawall <>
Acked-by: default avatarJingoo Han <>
Signed-off-by: default avatarFlorian Tobias Schandinat <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 56a2aba3
......@@ -129,7 +129,6 @@ static int da9052_backlight_probe(struct platform_device *pdev)
&da9052_backlight_ops, &props);
if (IS_ERR(bl)) {
dev_err(&pdev->dev, "Failed to register backlight\n");
devm_kfree(&pdev->dev, wleds);
return PTR_ERR(bl);
......@@ -149,7 +148,6 @@ static int da9052_backlight_remove(struct platform_device *pdev)
wleds->state = DA9052_WLEDS_OFF;
devm_kfree(&pdev->dev, wleds);
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment