From patchwork Fri Feb 22 04:50:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2174521 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 78ECB3FD4E for ; Fri, 22 Feb 2013 04:50:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755039Ab3BVEun (ORCPT ); Thu, 21 Feb 2013 23:50:43 -0500 Received: from mail-bk0-f42.google.com ([209.85.214.42]:39437 "EHLO mail-bk0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754965Ab3BVEun (ORCPT ); Thu, 21 Feb 2013 23:50:43 -0500 Received: by mail-bk0-f42.google.com with SMTP id jk7so113451bkc.15 for ; Thu, 21 Feb 2013 20:50:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=4jRb7KTEQZeyifaVIOWdXbJSJ7++w7e/HjnNSnEp5kk=; b=SzVABc4qJYvXCoLMDPSWWNMczc5PR95K/BVL8z2d70r2edxAe77dS47JEMpvXzy/9y bM0yuxAh9hO3ecxAc22hdABQWu25OAtSiVvmvszYhZ2v4k2ZM4Z5xR0pcGpWpMX0dRt2 I6mkSht8SHdTGk2JWXNmXLOcDp8CEpb42PipwyoceNDqJ83mChVMmffnwmNK/Lfc759k hkMrKu5x6ubEzBcHdQL9F9ZsDmLYmnszdGLxm4TCjsRpM2KE2TvQkZH5xycESaa1Haq2 MR9PDYBa97G6ntvSH9Iqzu8dkKed0OaA3Jni/WMQFzUm5sgugf1edID/DSnHJ/Owgr2t 67Lg== MIME-Version: 1.0 X-Received: by 10.204.145.195 with SMTP id e3mr216388bkv.27.1361508642067; Thu, 21 Feb 2013 20:50:42 -0800 (PST) Received: by 10.204.30.210 with HTTP; Thu, 21 Feb 2013 20:50:42 -0800 (PST) Date: Fri, 22 Feb 2013 12:50:42 +0800 Message-ID: Subject: [PATCH -next] thermal: rcar: fix missing unlock on error in rcar_thermal_update_temp() From: Wei Yongjun To: rui.zhang@intel.com, grant.likely@secretlab.ca, rob.herring@calxeda.com, kuninori.morimoto.gx@renesas.com Cc: yongjun_wei@trendmicro.com.cn, linux-pm@vger.kernel.org, devicetree-discuss@lists.ozlabs.org Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Wei Yongjun Add the missing unlock before return from function rcar_thermal_update_temp() in the error handling case. Signed-off-by: Wei Yongjun --- drivers/thermal/rcar_thermal.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" 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/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 909bb4b..fe694be 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -174,6 +174,7 @@ static int rcar_thermal_update_temp(struct rcar_thermal_priv *priv) if (!ctemp) { dev_err(dev, "thermal sensor was broken\n"); + mutex_unlock(&priv->lock); return -EINVAL; }