media: qcom: camss: Fix potential crash if domain attach fails
Subsystems (5)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 3/10 media: qcom: camss: Fix potential crash if domain attach fails
Fix a potential crash in camss by ensuring detach is skipped if attach is unsuccessful.
Fixes d89751c61279 ("media: qcom: camss: Add support for named power-domains")
Signed-off-by Vikram Sharma <[email protected]>
--- drivers/media/platform/qcom/camss/camss.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/media/platform/qcom/camss/camss.c +2 -3
@@ -2131,8 +2131,7 @@ static int camss_configure_pd(struct camss *camss) camss->genpd =dev_pm_domain_attach_by_name (camss->dev, camss->res->pd_name);if (IS_ERR (camss->genpd)) { - ret =PTR_ERR (camss->genpd); - goto fail_pm; +return PTR_ERR (camss->genpd); } }
@@ -2149,7 +2148,7 @@ static int camss_configure_pd(struct camss *camss) ret = -ENODEV ; else ret =PTR_ERR (camss->genpd); - goto fail_pm; +return ret; } camss->genpd_link = device_link_add(camss->dev, camss->genpd, DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME |
Signature · 1 line
2.25.1