Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp152991yba; Wed, 3 Apr 2019 06:20:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlEBcdTNBjljF+wxzdVIHetwFG1UoP3suXA/mjt6IbptWNV7NubXwqE7iOvXPyxdY0ENg6 X-Received: by 2002:a63:465b:: with SMTP id v27mr54998128pgk.165.1554297648156; Wed, 03 Apr 2019 06:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554297648; cv=none; d=google.com; s=arc-20160816; b=bNPexCgrpApDttyX03aS0GvUuaNi4Us91DfiDr9T541pHeM/BqDflovBYEEjWi9O5e LqR6C+0rOm8dF2qg7576mNSqcj8eUzdeevQiVbGW/eRTFb8R82SVL49J5K4v95BIU3Tf bUDqyLoiB8wAYA+hqFxs/SKW9zOOZpGXocLb3pIYHxfvtppWfZKlnwl1QJi6mmAFSRN7 ro27v+XlXbxvwxXq5FGv/hkA1A5Tc8kml4ALDvHZ1oi8BZ1QHrIJtW6gaBwkV9brLj7+ gxhkHz+JDhwT9ulkSdL4HSjkq7cbi2Ue4YLzXtv3wyDgl5j4JgiZoM4GUVeYc5ajRuWN j0eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=f+C4lSlQByTDMNg8o68cNiQpqPcaeTF9I5BO3xn3kJY=; b=mSzT8/B8NAA/5Xvh6HpEBZ2l51lkRJvAvVeWxc0l0PsAuVE0YAMdxd2rWLxVReJ5gu IMV7aK5ex6EyhPuwG6o/0LTBTr3AvFrX3NAwY2v4X28QVS+G4Uvc3wQiXWVDREBLcpJd 60Dx3TDLcct5S/wiKOmu1Tg6OTxxwqnv1/3pJQxWoN/ywESNyJJJp1LaPVgY+PVQk/bR wSMsUOQRwY4dKWRxtY9qnS/7JXPHuaBviEuPv2r6IKwrflKrfZ6k0ZCMe+/R9IX/ap93 /RsX/iIQx2nWXGkpJQi2hXyqCahQXWmKl0zqKXFzamZWemLLnBcCl7gnTyz1tm3vtWbY QQmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=FNx3KIn2; 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 g126si13522608pgc.75.2019.04.03.06.20.33; Wed, 03 Apr 2019 06:20:48 -0700 (PDT) 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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=FNx3KIn2; 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 S1726387AbfDCNSo (ORCPT + 99 others); Wed, 3 Apr 2019 09:18:44 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:45446 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbfDCNSo (ORCPT ); Wed, 3 Apr 2019 09:18:44 -0400 Received: by mail-pg1-f195.google.com with SMTP id y3so8313119pgk.12; Wed, 03 Apr 2019 06:18:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=f+C4lSlQByTDMNg8o68cNiQpqPcaeTF9I5BO3xn3kJY=; b=FNx3KIn2hcPpA3Eu1CtBcIzkjFvnISQ4KagJv5+BCFIw2CSLifxVCMbV6W6+xpGDRm 5YTiv5h2DpgBXWkZSU5N5x4BeGK0ADKVyvtzTy+MELIx+o2RhXsGER616eXjQ0XpaF4F eeLC8y8WvZx48ULgR+rpmbrWKXHjPwU8mVYf3tAvKuj8iTTnHyZcayJb6NymK/LQJgwx jPYBqL9y+VTK7cAqHqRPVdQZTVT2lxXd6p3rUgIpvpW9hZwuwOPZip5a31JDOIP+omk1 J9C4VZ4mEs+MrcIsOTJizxmi5TDxP5iyblfTd1/UFbSJAw6bsAxdCvUB0vWIY+u/JLaT 7agg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=f+C4lSlQByTDMNg8o68cNiQpqPcaeTF9I5BO3xn3kJY=; b=Z0c8vaqFQCs2V+rI+j8m5JXZtvx25XCuIXxkkgn4WavrHtn09eIG7XiyVD6duO4xOH D1ShLgdkk8rRI2pjO9RuD0Ha5XkAj2jfAy8TuBTQlHmB+MmImN41jh0wGxSPew5FTItL tS9crGPaDVqVSSxzhbbsIQud2TBM0Gm9tAms/KlzXxzOVdEIIwGcWRz3cG0BXe71b07l vG4UmKh8wv7pBdKQ9PtP1Q5S0EdCS7lFWCOccZwvCSFBiQMIInqQtgocd7IIfwIBDNVR mgdDplNHg80qlqEQ8Da4QjrKWUXt7OMytw6meGju4jtBc+3Izr9MZkPDgYU3kzeO62PJ L+Mw== X-Gm-Message-State: APjAAAU75LViTMaPqq1IeOlxejstHg2QjfJortIppbxdUQ+9hU7Pa2yb aEq6cEHYfWNOEdQorBdse1s= X-Received: by 2002:aa7:8019:: with SMTP id j25mr76037272pfi.77.1554297523467; Wed, 03 Apr 2019 06:18:43 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id k75sm40264975pfj.46.2019.04.03.06.18.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Apr 2019 06:18:41 -0700 (PDT) Date: Wed, 3 Apr 2019 06:18:39 -0700 From: Guenter Roeck To: Stefan Wahren Cc: Kamil Debski , Bartlomiej Zolnierkiewicz , Jean Delvare , Rob Herring , Mark Rutland , Robin Murphy , Lukasz Majewski , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, "# 4 . 14" Subject: Re: [PATCH] hwmon: pwm-fan: Disable PWM if fetching cooling data fails Message-ID: <20190403131839.GA31325@roeck-us.net> References: <1554295713-18656-1-git-send-email-stefan.wahren@i2se.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1554295713-18656-1-git-send-email-stefan.wahren@i2se.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 03, 2019 at 02:48:33PM +0200, Stefan Wahren wrote: > In case pwm_fan_of_get_cooling_data() fails we should disable the PWM > just like in the other error cases. > > Reported-by: Guenter Rock > Signed-off-by: Stefan Wahren > Fixes: 2e5219c77183 ("hwmon: (pwm-fan) Read PWM FAN configuration from device tree") > Cc: # 4.14 Applied. Thanks, Guenter > --- > drivers/hwmon/pwm-fan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c > index 167221c..e4c5197 100644 > --- a/drivers/hwmon/pwm-fan.c > +++ b/drivers/hwmon/pwm-fan.c > @@ -271,7 +271,7 @@ static int pwm_fan_probe(struct platform_device *pdev) > > ret = pwm_fan_of_get_cooling_data(&pdev->dev, ctx); > if (ret) > - return ret; > + goto err_pwm_disable; > > ctx->pwm_fan_state = ctx->pwm_fan_max_state; > if (IS_ENABLED(CONFIG_THERMAL)) {