Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp472680yba; Wed, 15 May 2019 04:45:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuAi9Cw6s0e53NCePMsLc7f/b1dkKpQSlXG/Zq5y4FYD0+fr19xQHADhIwaH4jqogvQBd4 X-Received: by 2002:a65:4243:: with SMTP id d3mr32938996pgq.57.1557920714733; Wed, 15 May 2019 04:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557920714; cv=none; d=google.com; s=arc-20160816; b=cFd5qv8egLcHXPkFgQOgLKIH1PRbTB090qqM5D+vAB/AiOMKGZKzR0PrWUKhLmN3g+ Bst4IdXQpSChaD0Cu1UF8VlLM25g673kpPx2Qgq7a/KBEmPfcbwJITZw9G6qool0SWcz ftnC704ExlkuB7/G967x+/irrhYLOo2YQmbminAHvuAT5vmkJuEsHpbbIDHEtV5GjuZd /gaxjQ6tO9HWXJc1OB67gWAZDGfAN9fwbsYQaj8JECMLJ5Mrg+i3kEbWiL+neOLB0dUc wrP0XAwtCoBrkHB7fB6/ACEc192+QuyBoVwFrVO0577d0F3orIWaP76JdZAsE6H4Wy2A MB1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vNU+uPfDv21mRzVXIENxbgW0gqsZvkyXe73F5CgMPso=; b=UaM6p/AY82HNu22R4fK64UpL0VwRHUchGUsOegBedlHvnSbSbazvN+tqtSlv4/UNlC lWW+aGGuGADYBXysirwsvhiH0imXNVr2ifzcX4lBQ3lexBHZeeC5sizzZsiZqY2YtBo2 gnoA+tdH18qtvfcesfWzA5esOhyUO9rW8s7jfoZx0Jdd80gEIa2G2XVNuO2ca7ZNIxdj pkJKDCJMkUT5chFbEqXVEVIByYdTm6Fqie48H7Ja3oOEdu0S2KGjbdhJj1Mnc6j7LBs2 sssFDyhbdaFtfmBzp26bN+FFT0D9z8+LWWuYnsjLurtvzGYHH+t1FVltBeI5jWyylSYE oz1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PixXZy7K; 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 q3si1901975pfc.89.2019.05.15.04.45.00; Wed, 15 May 2019 04:45:14 -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=pass header.i=@kernel.org header.s=default header.b=PixXZy7K; 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 S1731952AbfEOL1A (ORCPT + 99 others); Wed, 15 May 2019 07:27:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:37852 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730745AbfEOL06 (ORCPT ); Wed, 15 May 2019 07:26:58 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 29355206BF; Wed, 15 May 2019 11:26:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557919617; bh=axUyy+CxM87Y+wbA2jQUgiogIniTnUIy1IaZLqSjRfc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PixXZy7KS7/FM3Hcv4btt4vtGx+HIfF+8XK+oTHKxd22OM+yQgW/WKTUYvIJ+t20x KO6wYDEhMlxcECiZbJY9Nr4h8j73+DBzPcrCDpFl5eO5nBTw7Sub82OJEDDnY1ECIb 80rPwmqJF3+3C1saWFCu+f78ahDf3jaiZFFY/fLA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guenter Rock , Stefan Wahren Subject: [PATCH 5.0 005/137] hwmon: (pwm-fan) Disable PWM if fetching cooling data fails Date: Wed, 15 May 2019 12:54:46 +0200 Message-Id: <20190515090652.767781171@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515090651.633556783@linuxfoundation.org> References: <20190515090651.633556783@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Wahren commit 53f1647da3e8fb3e89066798f0fdc045064d353d upstream. In case pwm_fan_of_get_cooling_data() fails we should disable the PWM just like in the other error cases. Fixes: 2e5219c77183 ("hwmon: (pwm-fan) Read PWM FAN configuration from device tree") Cc: # 4.14+ Reported-by: Guenter Rock Signed-off-by: Stefan Wahren Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- drivers/hwmon/pwm-fan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/hwmon/pwm-fan.c +++ b/drivers/hwmon/pwm-fan.c @@ -254,7 +254,7 @@ static int pwm_fan_probe(struct platform 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)) {