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: 5402421 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 7B85C9F47A for ; Fri, 28 Nov 2014 09:45:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6B6AD20142 for ; Fri, 28 Nov 2014 09:45:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 96AE520123 for ; Fri, 28 Nov 2014 09:45:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751737AbaK1JpT (ORCPT ); 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-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=trJ40WILx3kVJLdpkGo2VW1SAXORo549eY/4zsoKhcM=; b=QoJXHDLh5MiUP7IzQIEI3oQpdm3XCnhfOnctew4TIClboBCaytI4nWK4T7GZI0chne U/hoBv2d/IXUPNYTFHDo43tSjb4Q9VVBOSp8H8wLESwklfeG8dt6SgSbJxAJfZPW044M 3XzIsSH7NgVetAZN4iujZr89nGtw/kSguCHl5v7kSMSfJcRuW/AK2UNQmLu5iEWseGeP 6eYkFgDIvUHXvqdDyyZgi6RXhnTL/4sYTZW/cr/nJVOEeNrMLwN2kFIQ523q52POVCWX 4hq9nhqjFLIR7IXtxG2R7pBwAcWS7GiuSQaWFOdKfP/bGZoG/pSM8gQC5Afj3e0fkNRz JRvA== X-Gm-Message-State: ALoCoQnEnWyEMA4AshyG75JkgD2CcN69v/srTCBV0lM9xxRQXdZQ9eC/xUO3T9hjpScgzrZesChA 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: 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=unavailable 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 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",