From patchwork Fri Apr 12 05:54:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 2434091 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 7614ADF2A1 for ; Fri, 12 Apr 2013 05:54:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752397Ab3DLFyZ (ORCPT ); Fri, 12 Apr 2013 01:54:25 -0400 Received: from mail-da0-f51.google.com ([209.85.210.51]:47264 "EHLO mail-da0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750817Ab3DLFyZ (ORCPT ); Fri, 12 Apr 2013 01:54:25 -0400 Received: by mail-da0-f51.google.com with SMTP id g27so994161dan.10 for ; Thu, 11 Apr 2013 22:54:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:subject:from:to:cc:date:content-type:x-mailer :mime-version:content-transfer-encoding:x-gm-message-state; bh=3oLsqU8uFgmgBgOiNZBVsGG1fBV/AiUTgsobMIejwUM=; b=h7wUgoFppmVQrqVp5XWeKGe5SvVUOlyiJxMUo9H1x5nbBzE/TeYwvzjaQ/OaLCgKKY gRDL5yGTIXXHiMejH1ZKWR5NMPffuHw3k8lhAK+G704Okso4k/X+Ug74kIlRfpjIqvCe Ezm8Thhsng1jJb6pnCDjFtcLMhs9Eb3KDkaopRTknWwT8PLvwxzGM+Ccu7oaTwmmedNq lIY6LWHCwvkg9mmcDX10qbi0Tk7pyIhAB4krPI0vs5ehP9qCSOb/qobHvIUK3Ap7qYyQ Q+X6wYKeMYws6gDcLL1XsCafNWNF7GULx6cbNlVzusBcKnBO0j3rBAgigCvPW35pGDCA K11g== X-Received: by 10.66.251.231 with SMTP id zn7mr13595343pac.71.1365746064454; Thu, 11 Apr 2013 22:54:24 -0700 (PDT) Received: from [192.168.0.102] (114-40-8-210.dynamic.hinet.net. [114.40.8.210]) by mx.google.com with ESMTPS id ad7sm7143639pbd.14.2013.04.11.22.54.21 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 22:54:23 -0700 (PDT) Message-ID: <1365746058.4025.1.camel@phoenix> Subject: [RESEND][PATCH 1/3] PM / devfreq: exynos4_bus: Fix missing mutex_unlock if opp_find_freq_floor fails From: Axel Lin To: "Rafael J. Wysocki" , MyungJoo Ham Cc: Kyungmin Park , Kukjin Kim , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 12 Apr 2013 13:54:18 +0800 X-Mailer: Evolution 3.6.2-0ubuntu0.1 Mime-Version: 1.0 X-Gm-Message-State: ALoCoQkRN5X/wsubFQ10W+Kov3X1OQxcuMeSIRJ22lRVkhnZj+fQ+wq+L1y5Xfnun17NRcteLYXY Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org We need to call mutex_unlock() in the error path. Signed-off-by: Axel Lin --- drivers/devfreq/exynos4_bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c index 1deee09..54b9615 100644 --- a/drivers/devfreq/exynos4_bus.c +++ b/drivers/devfreq/exynos4_bus.c @@ -974,7 +974,8 @@ static int exynos4_busfreq_pm_notifier_event(struct notifier_block *this, rcu_read_unlock(); dev_err(data->dev, "%s: unable to find a min freq\n", __func__); - return PTR_ERR(opp); + err = PTR_ERR(opp); + goto unlock; } new_oppinfo.rate = opp_get_freq(opp); new_oppinfo.volt = opp_get_voltage(opp);