From patchwork Wed Jan 27 03:36:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 8128961 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1354E9F818 for ; Wed, 27 Jan 2016 03:37:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 20358202EB for ; Wed, 27 Jan 2016 03:37:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 234DF20295 for ; Wed, 27 Jan 2016 03:37:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752303AbcA0DhK (ORCPT ); Tue, 26 Jan 2016 22:37:10 -0500 Received: from lists.s-osg.org ([54.187.51.154]:54381 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751877AbcA0DhH (ORCPT ); Tue, 26 Jan 2016 22:37:07 -0500 Received: from sauron.localdomain (unknown [181.120.163.117]) by lists.s-osg.org (Postfix) with ESMTPSA id 3C2C046321; Tue, 26 Jan 2016 19:37:02 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Kukjin Kim , rtc-linux@googlegroups.com, Andi Shyti , Chanwoo Choi , Alexandre Belloni , Krzysztof Kozlowski , Laxman Dewangan , linux-samsung-soc@vger.kernel.org, Javier Martinez Canillas Subject: [PATCH v4 01/10] rtc: max77686: Fix max77686_rtc_read_alarm() return value Date: Wed, 27 Jan 2016 00:36:37 -0300 Message-Id: <1453865806-4661-2-git-send-email-javier@osg.samsung.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1453865806-4661-1-git-send-email-javier@osg.samsung.com> References: <1453865806-4661-1-git-send-email-javier@osg.samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The function is always returning zero even in case of failures since the ret value was not propagated to the callers. Fix the error path. Reported-by: Krzysztof Kozlowski Signed-off-by: Javier Martinez Canillas Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Acked-by: Laxman Dewangan Reviewed-by: Andi Shyti --- Changes in v4: - Add Andi Shyti's Reviewed-by to patch #1. Changes in v3: - Add Krzysztof Kozlowski's Reviewed-by and Tested-by to patch #1. - Add Laxman Dewangan's Acked-by tag to patch #1. Changes in v2: None drivers/rtc/rtc-max77686.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c index 7184a0eda793..6653c3d11b66 100644 --- a/drivers/rtc/rtc-max77686.c +++ b/drivers/rtc/rtc-max77686.c @@ -235,7 +235,7 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) out: mutex_unlock(&info->lock); - return 0; + return ret; } static int max77686_rtc_stop_alarm(struct max77686_rtc_info *info)