Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753066AbeADML6 (ORCPT + 1 other); Thu, 4 Jan 2018 07:11:58 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40156 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753150AbeADMKA (ORCPT ); Thu, 4 Jan 2018 07:10:00 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Troy Kisky , Alexandre Belloni , Christoph Fritz Subject: [PATCH 4.14 10/14] rtc: m41t80: m41t80_sqw_set_rate should return 0 on success Date: Thu, 4 Jan 2018 13:09:27 +0100 Message-Id: <20180104120918.401960075@linuxfoundation.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180104120917.043667757@linuxfoundation.org> References: <20180104120917.043667757@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Troy Kisky commit de6042d2fa8afe22b76e3c68fd6e9584c9415a3b upstream. Previously it was returning -EINVAL upon success. Signed-off-by: Troy Kisky Signed-off-by: Alexandre Belloni Cc: Christoph Fritz Signed-off-by: Greg Kroah-Hartman --- drivers/rtc/rtc-m41t80.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/rtc/rtc-m41t80.c +++ b/drivers/rtc/rtc-m41t80.c @@ -510,10 +510,7 @@ static int m41t80_sqw_set_rate(struct cl reg = (reg & 0x0f) | (val << 4); ret = i2c_smbus_write_byte_data(client, reg_sqw, reg); - if (ret < 0) - return ret; - - return -EINVAL; + return ret; } static int m41t80_sqw_control(struct clk_hw *hw, bool enable)