Commit 8f711263 authored by Niklas Söderlund's avatar Niklas Söderlund Committed by Mauro Carvalho Chehab

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: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: default avatarJacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent b2dc5680
...@@ -946,17 +946,23 @@ static int rvin_mc_init(struct rvin_dev *vin) ...@@ -946,17 +946,23 @@ static int rvin_mc_init(struct rvin_dev *vin)
if (ret) if (ret)
return ret; return ret;
ret = rvin_create_controls(vin, NULL);
if (ret < 0)
return ret;
ret = rvin_group_get(vin); ret = rvin_group_get(vin);
if (ret) if (ret)
return ret; goto err_controls;
ret = rvin_mc_parse_of_graph(vin); ret = rvin_mc_parse_of_graph(vin);
if (ret) if (ret)
rvin_group_put(vin); goto err_group;
ret = rvin_create_controls(vin, NULL); return 0;
if (ret < 0) err_group:
return ret; rvin_group_put(vin);
err_controls:
rvin_free_controls(vin);
return ret; return ret;
} }
......
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