From patchwork Sun Dec 2 10:25:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1831091 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 7E7003FCA5 for ; Sun, 2 Dec 2012 16:52:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6746DE5DD1 for ; Sun, 2 Dec 2012 08:52:08 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f177.google.com (mail-qc0-f177.google.com [209.85.216.177]) by gabe.freedesktop.org (Postfix) with ESMTP id CC9CEE5C75 for ; Sun, 2 Dec 2012 02:25:06 -0800 (PST) Received: by mail-qc0-f177.google.com with SMTP id u28so997232qcs.36 for ; Sun, 02 Dec 2012 02:25:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=D1ueMgzbnR49VqaUuqjiAsXVqVNnRHTZ+xpQAL5z7RA=; b=aGRZNgL/J4B+DE1lCgzd4OIeWSNZ12o5+YvazpBEYrnPvduxDDIhfN0Usf7irQXv2v oc7WbLoMVMp6St3cFEYFZxKj+EsktU5LLOnwcsMSEZYsWELxs9dhCm5m2yCiOopKRfeo P9EWDAHSNPCY0wqzva4A02fDXOk6gAfx/Sp8/NFUglJIta3OtUko1Jn9UGcxZFKLvITD gVcSXWWKKPKUpnG4oMuLpTHaYf4TE7K+CpwjesDrDXkoa5wAm5675DmodEa/U8/Vc46H i19Q/2Nfme1f/bE/XP1qOdxGEKrXKEeybd6e+xGVRmGJJuo+vaRtcXfK6uESr/JveBL3 HbKg== MIME-Version: 1.0 Received: by 10.49.108.9 with SMTP id hg9mr12081858qeb.34.1354443905932; Sun, 02 Dec 2012 02:25:05 -0800 (PST) Received: by 10.229.126.165 with HTTP; Sun, 2 Dec 2012 02:25:05 -0800 (PST) Date: Sun, 2 Dec 2012 05:25:05 -0500 Message-ID: Subject: [PATCH -next] drm: tegra: fix missing unlock on error From: Wei Yongjun To: airlied@linux.ie, grant.likely@secretlab.ca, rob.herring@calxeda.com, thierry.reding@avionic-design.de X-Mailman-Approved-At: Sun, 02 Dec 2012 08:50:12 -0800 Cc: linux-tegra@vger.kernel.org, yongjun_wei@trendmicro.com.cn, devicetree-discuss@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.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(+) 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; } }