From patchwork Sun Dec 2 10:25:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [-next] drm: tegra: fix missing unlock on error Date: Sun, 02 Dec 2012 00:25:05 -0000 From: Wei Yongjun X-Patchwork-Id: 203198 Message-Id: To: airlied@linux.ie, grant.likely@secretlab.ca, rob.herring@calxeda.com, thierry.reding@avionic-design.de Cc: yongjun_wei@trendmicro.com.cn, dri-devel@lists.freedesktop.org, devicetree-discuss@lists.ozlabs.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org From: Wei Yongjun Add the missing unlock before return from function host1x_drm_init() and host1x_drm_exit() in the error handling case. Signed-off-by: Wei Yongjun Acked-by: Thierry Reding --- drivers/gpu/drm/tegra/host1x.c | 2 ++ 1 file changed, 2 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/tegra/host1x.c b/drivers/gpu/drm/tegra/host1x.c index bdb97a5..39629e6 100644 --- a/drivers/gpu/drm/tegra/host1x.c +++ b/drivers/gpu/drm/tegra/host1x.c @@ -176,6 +176,7 @@ int host1x_drm_init(struct host1x *host1x, struct drm_device *drm) dev_err(host1x->dev, "DRM setup failed for %s: %d\n", dev_name(client->dev), err); + mutex_unlock(&host1x->clients_lock); return err; } } @@ -203,6 +204,7 @@ int host1x_drm_exit(struct host1x *host1x) dev_err(host1x->dev, "DRM cleanup failed for %s: %d\n", dev_name(client->dev), err); + mutex_unlock(&host1x->clients_lock); return err; } }