mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 22:14:41 +08:00
media: rcar-vin: Fix error paths for rvin_mc_init()
The error paths of rvin_mc_init() do not clean up properly, fix this. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
b2dc5680ae
commit
8f7112630b
@ -946,18 +946,24 @@ static int rvin_mc_init(struct rvin_dev *vin)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = rvin_group_get(vin);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = rvin_mc_parse_of_graph(vin);
|
||||
if (ret)
|
||||
rvin_group_put(vin);
|
||||
|
||||
ret = rvin_create_controls(vin, NULL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = rvin_group_get(vin);
|
||||
if (ret)
|
||||
goto err_controls;
|
||||
|
||||
ret = rvin_mc_parse_of_graph(vin);
|
||||
if (ret)
|
||||
goto err_group;
|
||||
|
||||
return 0;
|
||||
err_group:
|
||||
rvin_group_put(vin);
|
||||
err_controls:
|
||||
rvin_free_controls(vin);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user