mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 13:43:51 +00:00
media: raspberrypi: Do some cleanup in probe()
If devm_clk_get() fails then we need to free "cfe" before returning.
Fixes: 6edb685abb
("media: raspberrypi: Add support for RP1-CFE")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
parent
e7724e2319
commit
8e9a03bd41
@ -2342,9 +2342,11 @@ static int cfe_probe(struct platform_device *pdev)
|
||||
|
||||
/* TODO: Enable clock only when running. */
|
||||
cfe->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(cfe->clk))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(cfe->clk),
|
||||
"clock not found\n");
|
||||
if (IS_ERR(cfe->clk)) {
|
||||
ret = dev_err_probe(&pdev->dev, PTR_ERR(cfe->clk),
|
||||
"clock not found\n");
|
||||
goto err_cfe_put;
|
||||
}
|
||||
|
||||
cfe->mdev.dev = &pdev->dev;
|
||||
cfe->mdev.ops = &cfe_media_device_ops;
|
||||
|
Loading…
Reference in New Issue
Block a user