From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33FA4C43381 for ; Tue, 19 Feb 2019 21:55:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EFA4C2147A for ; Tue, 19 Feb 2019 21:55:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="a1xp7ru3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727657AbfBSVza (ORCPT ); Tue, 19 Feb 2019 16:55:30 -0500 Received: from mail-wm1-f48.google.com ([209.85.128.48]:38299 "EHLO mail-wm1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725994AbfBSVza (ORCPT ); Tue, 19 Feb 2019 16:55:30 -0500 Received: by mail-wm1-f48.google.com with SMTP id v26so4340938wmh.3 for ; Tue, 19 Feb 2019 13:55:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=u8HWpz+HrSpcblvlz14Q9pGY0NaCBWsDhGUrHEVUQ2A=; b=a1xp7ru3/wqObuTIuBYCdDbwbN2gzEEgJxFUEVc72bCTghA75opLbY4vZdSaY82FCr scGpfw7mRKWaT09WD63ojcCZJ7QKQ5ssuc12dYlOA0qSvv9aiuVdi2ogNSQ0ZorbbRiM F2zMPCCBvmtjrR1TeMqyGPxtAXdGuvpC+4cQuKTYNmNM5TCL1MB7xdb0hmQ08r07fj61 XUmps2g24MFf8DxpgDEZUQJgTdvCoyWRXzX2f2m0o/1/TBNV50vq1N0XqmGjffEy3L1N EUBaWP47FCAuHxpvyEncMY/orsbHIUW4wSl832E9j/mXWyiZ1W318OQrgLN+oFQbikG/ iHZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=u8HWpz+HrSpcblvlz14Q9pGY0NaCBWsDhGUrHEVUQ2A=; b=QuY5WrYGOmd/tgO0eMvwkeIMwQvH66wzIhwRtXCp+w7VQ8QDFxD2dU0TURfSW3dkSf OsHYVF0b6Ylkw0pXDhKHqmARIxMM/ckEFJLHOC1B8XJCZBbbFmGIoxrQYEDwXgQf7qxr 06qWio+9CUYnmwIXk56+vLaURCHXrhWVpluu1cZnQQX3ZJgIg11uSBmPKZN90eCaHhlk +6f8KlbuRxz5PPh4u6+26XXelpqGgaS9dDyhzkKymJt5+tShaNb3tzUFQRXaDN3Diqps /GBP592jiThs7cXcSETVkr1F9ZAp1CDMk4XkxXhtiMOfNvxpxp9aLvPdbn/7JnM8Sr8c SpAg== X-Gm-Message-State: AHQUAubZ4OYgvtXObMkxPjFKPRtH/0NSIB0pWG0Jgy9jj6U1I5dINaIn 1NWyY+2p1FYdXrvn5IgTSnn1M3UQ X-Google-Smtp-Source: AHgI3IYNS/7VOLMzv7JDtSRNhexpKiga8TxDvpHU8t2G8lzltxvaEFZ9+uE/DwYP2b/T5yapt50kIw== X-Received: by 2002:a1c:d147:: with SMTP id i68mr4405995wmg.41.1550613327748; Tue, 19 Feb 2019 13:55:27 -0800 (PST) Received: from debian (cpc101300-bagu16-2-0-cust362.1-3.cable.virginm.net. [86.21.41.107]) by smtp.gmail.com with ESMTPSA id b4sm5869785wmj.3.2019.02.19.13.55.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Feb 2019 13:55:26 -0800 (PST) Date: Tue, 19 Feb 2019 21:55:25 +0000 From: Sudip Mukherjee To: Greg Kroah-Hartman Cc: stable@vger.kernel.org, Wei Yongjun , Guenter Roeck Subject: request for 4.14-stable: 07bd14ccc304 ("hwmon: (lm80) Fix missing unlock on error in set_fan_div()") Message-ID: <20190219215525.tldji4ywlql3rmnl@debian> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="v76os26xg57dy73k" Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org --v76os26xg57dy73k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Greg, This was not marked for stable but the commit which it fixes is in stable. Please apply to your queue of 4.14-stable. -- Regards Sudip --v76os26xg57dy73k Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-hwmon-lm80-Fix-missing-unlock-on-error-in-set_fan_di.patch" >From f32d692377ac234158dbcbb393d0b32a3c8980df Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Wed, 26 Dec 2018 11:28:24 +0000 Subject: [PATCH] hwmon: (lm80) Fix missing unlock on error in set_fan_div() commit 07bd14ccc3049f9c0147a91a4227a571f981601a upstream Add the missing unlock before return from function set_fan_div() in the error handling case. Fixes: c9c63915519b ("hwmon: (lm80) fix a missing check of the status of SMBus read") Signed-off-by: Wei Yongjun Signed-off-by: Guenter Roeck Signed-off-by: Sudip Mukherjee --- drivers/hwmon/lm80.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c index 0e30fa00204c..f9b8e3e23a8e 100644 --- a/drivers/hwmon/lm80.c +++ b/drivers/hwmon/lm80.c @@ -393,8 +393,10 @@ static ssize_t set_fan_div(struct device *dev, struct device_attribute *attr, } rv = lm80_read_value(client, LM80_REG_FANDIV); - if (rv < 0) + if (rv < 0) { + mutex_unlock(&data->update_lock); return rv; + } reg = (rv & ~(3 << (2 * (nr + 1)))) | (data->fan_div[nr] << (2 * (nr + 1))); lm80_write_value(client, LM80_REG_FANDIV, reg); -- 2.11.0 --v76os26xg57dy73k--