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: 5435111 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id ECB9C9F1D4 for ; Thu, 4 Dec 2014 04:13:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D77520266 for ; Thu, 4 Dec 2014 04:13:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 617662021F for ; Thu, 4 Dec 2014 04:13:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752994AbaLDENc (ORCPT ); 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=bC9W9ZW7vURnFu82qEtEmELfQ+2iVOpf+m07ZYcc1s0=; b=O6OkGKBQ3EVcMrpEHv4AakBDZYtxmOw9NvbxvW/yonS7Ko8Q4WCkEziPuE+kTa1Mni Svf+DC98pS4dwwEjnKdr44QhjhgMdF9QHcuBAGaZMzi5CJPcCyiUfOKkHjYFXIDRPepL //6z6+Tj0Zeu+pnRO5fEnzDWjuiOk0YhrrEyOygNG3lv6Khvmt3fXCPqV4BcqSuwyh9K 7UIcvWGQKpAwr2yn8HXJWNWLCGXef8VQkWWCVJPk10d1oGDAWv21c3EKnuSzDZG4mTar cuUj5VXEptU/w2xtCZr27xeki0X/fN0WOr78JCWQw6QcC22Ls2rZLBSE4re2Uwq1x4ol /knA== X-Gm-Message-State: ALoCoQn4JTizsYCjfh0dmi+2+OhfGyXAJKs40YZtFvQw9ojQGuOJkUjlMdWqgaQ0P2ozI+e6b1Fj 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: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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",