Message ID | 20210709142600.651718-3-niklas.soderlund+renesas@ragnatech.se |
---|---|
State | Accepted |
Commit | 8f7112630bd0c7f43ae4fba9f054c74c1fba650a |
Headers | show |
Series | [v2,01/11] rcar-vin: Refactor controls creation for video device | expand |
diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c index 6ea561fcd7a394fa..bea3880752169344 100644 --- a/drivers/media/platform/rcar-vin/rcar-core.c +++ b/drivers/media/platform/rcar-vin/rcar-core.c @@ -946,17 +946,23 @@ static int rvin_mc_init(struct rvin_dev *vin) if (ret) return ret; + ret = rvin_create_controls(vin, NULL); + if (ret < 0) + return ret; + ret = rvin_group_get(vin); if (ret) - return ret; + goto err_controls; ret = rvin_mc_parse_of_graph(vin); if (ret) - rvin_group_put(vin); + goto err_group; - ret = rvin_create_controls(vin, NULL); - if (ret < 0) - return ret; + return 0; +err_group: + rvin_group_put(vin); +err_controls: + rvin_free_controls(vin); return ret; }