mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-27 00:20:58 +07:00
backlight: fix memory leak on obscure error path
Dredged out of bugzilla Reported-by: Martlin Ettl <ettl.martin@gmx.de> Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=15492 Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
59f91e5dd0
commit
9ea3c49896
@ -228,6 +228,7 @@ static int pm860x_backlight_probe(struct platform_device *pdev)
|
||||
data->port = pdata->flags;
|
||||
if (data->port < 0) {
|
||||
dev_err(&pdev->dev, "wrong platform data is assigned");
|
||||
kfree(data);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user