Received: by 10.223.185.116 with SMTP id b49csp1011640wrg; Wed, 21 Feb 2018 10:32:16 -0800 (PST) X-Google-Smtp-Source: AH8x224trdMQCaDm/kpzX/ZF5e+zirXRnQm4OVrFv2Nk7B9m6RC7HQ5feAO5bZvQsg2cz9t5lyyD X-Received: by 10.99.115.73 with SMTP id d9mr3525544pgn.354.1519237935930; Wed, 21 Feb 2018 10:32:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519237935; cv=none; d=google.com; s=arc-20160816; b=B5kpCZFyGHdIVYn2FICB6sFm9innv6ByzkmaApjq4faPhSE/T2CEUKJlBKKlgWLOGQ j98CTe6X/MLPQeeWhLJM+HzdYXP2sksSa25r8valWdiLk+7zpIv2qvKNRasLOCBtdkVn mu8YtHRRkP61tEarFm9mLXLi9i1BxzCl8VaaIAjUSJh3TEsqnoScdMgZsFc/MgX37dD2 P8cRjvvKMaJ4jlnDLRe+C+EN4yZVyMGyaVEtOrkT4CAUb1wwScE51SyIDTbR7fhNTZG1 imWw5egYar8WZokTMNZ7rLi0aehaY4JrTTEPijY388+qPt1wK7eJs8xst2IW9eAlcZMh fkEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=r2FQZrorKEWgtD4Twu8l5NQv1nD+GEiskfpeRyoDhOk=; b=VxO1M2LMtboLoQDjNzaTCpCTEHwI2iVJQjzfTN5SDJ0fPiBAqi/KJ8TUbw9jo2qIGf e/I/kvITQyqLZiOCvgCKxWpzKuIvX4YdBxkejXNmh4pCaodMPiCGDXVJENL8p4sgNwli lq0rQr7FIPPe8qCxDceN0tuQnb+Mhy55fxLwclx2VrqC33k0IfLis0tOa7BAbL5dkolZ 6D8LP6vSOWpjZD8wcNOVVJ1xfSP/XlQAjE3VoSJvDBwLWbeYQi6Q/C/0gva8RubfYq5Z Ct/uLJsa87FdiVDt3mm7P93+Z4J61CQVO8tiKDv9+oT1WVa2UwRK2FBrtBWBhoLcmluF cRjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17si7986101pgp.809.2018.02.21.10.32.01; Wed, 21 Feb 2018 10:32:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964977AbeBUNGL (ORCPT + 99 others); Wed, 21 Feb 2018 08:06:11 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40562 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964913AbeBUNGH (ORCPT ); Wed, 21 Feb 2018 08:06:07 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1CD0B11CD; Wed, 21 Feb 2018 13:06:06 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chanwoo Choi , Bjorn Andersson , MyungJoo Ham Subject: [PATCH 4.15 015/163] PM / devfreq: Propagate error from devfreq_add_device() Date: Wed, 21 Feb 2018 13:47:24 +0100 Message-Id: <20180221124530.952810375@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bjorn Andersson commit d1bf2d30728f310f72296b54f0651ecdb09cbb12 upstream. Propagate the error of devfreq_add_device() in devm_devfreq_add_device() rather than statically returning ENOMEM. This makes it slightly faster to pinpoint the cause of a returned error. Fixes: 8cd84092d35e ("PM / devfreq: Add resource-managed function for devfreq device") Cc: stable@vger.kernel.org Acked-by: Chanwoo Choi Signed-off-by: Bjorn Andersson Signed-off-by: MyungJoo Ham Signed-off-by: Greg Kroah-Hartman --- drivers/devfreq/devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -737,7 +737,7 @@ struct devfreq *devm_devfreq_add_device( devfreq = devfreq_add_device(dev, profile, governor_name, data); if (IS_ERR(devfreq)) { devres_free(ptr); - return ERR_PTR(-ENOMEM); + return devfreq; } *ptr = devfreq;