From patchwork Thu Dec 4 04:11:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41896 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 09ADB25E88 for ; Thu, 4 Dec 2014 04:13:37 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id l18sf10320338wgh.2 for ; Wed, 03 Dec 2014 20:13:36 -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=LXWZreUIrrXrHLb4OQUVz3TaNATzePNWjkfQJNDP3Ho=; b=ew7k2tZK9kNwaIlnGW/R3e1RU1zLP2uvr+leMSC61oMJOztqZ60TIudHiYsCjdGwmb 2WNMXPloVgW343Z22GYxcMBNDPDPeylTWSelN8YmC7cGJJZGNzhpMxCdWCU2CzTFsoEu WyNmEaDBiVxdheMPS2LA8H33m0mSv5dxWbB5L1geAv0VfcpOmJ10MEFSFjBji739a0MJ kwb/hln7VYOLmhG6+TG++fox6ZOtNW1vcju2y6Ua3OMsjJ+DwlYTxgT95gDbtWPxbOV6 8IZoKY6nJBwCrFN2wFjY/gRsyIi4hKfnDz0SJhjedlxsLj4AQbWGKaz53wfW1ixMi7E1 fE1A== X-Gm-Message-State: ALoCoQnWuCEZlWgkn9/jHJcSkgWOopfxrHXv+S992gZea1Vb47ESgWksegokJpyqZKQRcXer1ePN X-Received: by 10.180.98.165 with SMTP id ej5mr18635039wib.1.1417666416363; Wed, 03 Dec 2014 20:13:36 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.97 with SMTP id r1ls242932lar.0.gmail; Wed, 03 Dec 2014 20:13:35 -0800 (PST) X-Received: by 10.112.171.6 with SMTP id aq6mr7347691lbc.28.1417666415913; Wed, 03 Dec 2014 20:13:35 -0800 (PST) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id i1si24631062lag.75.2014.12.03.20.13.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Dec 2014 20:13:35 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by mail-lb0-f170.google.com with SMTP id w7so13543987lbi.15 for ; Wed, 03 Dec 2014 20:13:35 -0800 (PST) X-Received: by 10.112.173.202 with SMTP id bm10mr7089916lbc.74.1417666415823; Wed, 03 Dec 2014 20:13:35 -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 ew9csp781062lbc; Wed, 3 Dec 2014 20:13:34 -0800 (PST) X-Received: by 10.66.227.103 with SMTP id rz7mr14376007pac.45.1417666414116; Wed, 03 Dec 2014 20:13:34 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id df1si18139882pdb.237.2014.12.03.20.13.33 for ; Wed, 03 Dec 2014 20:13:34 -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 S1752994AbaLDENc (ORCPT + 12 others); Wed, 3 Dec 2014 23:13:32 -0500 Received: from mail-pd0-f173.google.com ([209.85.192.173]:64158 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752986AbaLDENc (ORCPT ); Wed, 3 Dec 2014 23:13:32 -0500 Received: by mail-pd0-f173.google.com with SMTP id ft15so16878504pdb.32 for ; Wed, 03 Dec 2014 20:13:32 -0800 (PST) X-Received: by 10.68.68.130 with SMTP id w2mr21915587pbt.167.1417666412005; Wed, 03 Dec 2014 20:13:32 -0800 (PST) Received: from localhost ([122.166.92.172]) by mx.google.com with ESMTPSA id pc8sm24533140pdb.54.2014.12.03.20.13.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 03 Dec 2014 20:13:31 -0800 (PST) From: Viresh Kumar To: linux-pm@vger.kernel.org, edubezval@gmail.com Cc: linaro-kernel@lists.linaro.org, rui.zhang@intel.com, amit.daniel@samsung.com, javi.merino@arm.com, Viresh Kumar Subject: [PATCH V2 12/26] thermal: cpu_cooling: propagate error returned by idr_alloc() Date: Thu, 4 Dec 2014 09:41:54 +0530 Message-Id: <572e759226b469c45bdc9875bbd05ff6ebf921e1.1417664938.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.170 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 d57b8bb..5c9a2ef 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -485,7 +485,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(ret); } snprintf(dev_name, sizeof(dev_name), "thermal-cpufreq-%d",