From patchwork Fri Nov 28 09:44:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41678 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D9C00244C2 for ; Fri, 28 Nov 2014 09:45:23 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf4040991eek.9 for ; Fri, 28 Nov 2014 01:45:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=fgo4Z1YGg6PKFZsyZGMf8UwNa8W2cLyUayF3cS6DPOc=; b=OWa9JnCHktfuxnf6F2vMypbGT8426yD7PaYZTb+BAl+8C+5RF4kW1FDfDnHfvf9PSo MLekbowxdfQn/ZMQ+y5m5qjzUQyciDehoS9Le9wf/X5xiwTR2qdtXJ3DQsU1U7WzZJ57 tAFSzg+Sn5jZ+hl1D0bbzRr2liHhSSe/U6dHP8TSJupE05g/JIWGG2Zhzhn9QgwqWIDC 124j1q8CN88nkktIgC+QQNZ3MdIIAo7brciBG9UgXPeU5n3NWbxGCB7sV7m+w7Qsttig FO8kCUpK76wSKe9/8PASPVxj9sXEyj/LOaV6TOzlbofkUj1t7IHVS4jxeyzh0HeQblzD 2pnw== X-Gm-Message-State: ALoCoQmuDEFK3+0pRHNsiqn2y+zfLKRxoxxfGR95Y6Zln3ReCqEv/CUE8yfNNi4AcJayFexXviQZ X-Received: by 10.112.146.104 with SMTP id tb8mr27776lbb.22.1417167923155; Fri, 28 Nov 2014 01:45:23 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.168 with SMTP id u8ls831101lag.103.gmail; Fri, 28 Nov 2014 01:45:22 -0800 (PST) X-Received: by 10.152.87.171 with SMTP id az11mr42165307lab.37.1417167922926; Fri, 28 Nov 2014 01:45:22 -0800 (PST) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id f8si9479182lae.46.2014.11.28.01.45.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Nov 2014 01:45:22 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by mail-lb0-f181.google.com with SMTP id 10so5244248lbg.26 for ; Fri, 28 Nov 2014 01:45:22 -0800 (PST) X-Received: by 10.112.138.137 with SMTP id qq9mr42750306lbb.80.1417167922848; Fri, 28 Nov 2014 01:45:22 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp60433lbc; Fri, 28 Nov 2014 01:45:22 -0800 (PST) X-Received: by 10.68.143.226 with SMTP id sh2mr71220927pbb.62.1417167921337; Fri, 28 Nov 2014 01:45:21 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id vj10si15336419pbc.138.2014.11.28.01.45.20 for ; Fri, 28 Nov 2014 01:45:21 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751737AbaK1JpT (ORCPT + 12 others); Fri, 28 Nov 2014 04:45:19 -0500 Received: from mail-pd0-f175.google.com ([209.85.192.175]:58628 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751735AbaK1JpS (ORCPT ); Fri, 28 Nov 2014 04:45:18 -0500 Received: by mail-pd0-f175.google.com with SMTP id y10so6387329pdj.6 for ; Fri, 28 Nov 2014 01:45:18 -0800 (PST) X-Received: by 10.66.241.239 with SMTP id wl15mr16610549pac.15.1417167918326; Fri, 28 Nov 2014 01:45:18 -0800 (PST) Received: from localhost ([122.167.111.40]) by mx.google.com with ESMTPSA id nc9sm9345361pbc.55.2014.11.28.01.45.17 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Nov 2014 01:45:17 -0800 (PST) From: Viresh Kumar To: linux-pm@vger.kernel.org, edubezval@gmail.com Cc: linaro-kernel@lists.linaro.org, rui.zhang@intel.com, Viresh Kumar Subject: [PATCH 11/26] cpu_cooling: propagate error returned by idr_alloc() Date: Fri, 28 Nov 2014 15:14:05 +0530 Message-Id: <1cfc99a9a641f2937a8ac95c6b784e3eee033b0c.1417167599.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.3.693.g996b0fd In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , We aren't supposed to return our own error type here. Return what we got. Signed-off-by: Viresh Kumar --- drivers/thermal/cpu_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index bb11dd4..964586f 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -477,7 +477,7 @@ __cpufreq_cooling_register(struct device_node *np, ret = get_idr(&cpufreq_idr, &cpufreq_dev->id); if (ret) { kfree(cpufreq_dev); - return ERR_PTR(-EINVAL); + return ERR_PTR(cpufreq_dev->id); } snprintf(dev_name, sizeof(dev_name), "thermal-cpufreq-%d",