From nobody Tue Jun 30 10:17:15 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A10BC433EF for ; Wed, 19 Jan 2022 17:27:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356406AbiASR1v (ORCPT ); Wed, 19 Jan 2022 12:27:51 -0500 Received: from mail.hugovil.com ([162.243.120.170]:48990 "EHLO mail.hugovil.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356396AbiASR1t (ORCPT ); Wed, 19 Jan 2022 12:27:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Cc:To :From:Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=FjYoXQn5cgOEx2kBfibluRCJVVHL6QyDcw2CqgY2fSc=; b=E YIO44GJbGigNDklMlRFt1AgnpmDtZaPtZZ9IfVLgE37LaemrH/TK64XCNksjY8Ab8llkDGAFSYE45 IAiB6MQZnd+hEQD8/9hrQ/T4QfmZv+3xHlfsPh2tlL+EplgNlxSATbDkqzQUoyFvWx854UoqtQmHi m6qol7/kx0OL7LUk=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:54846 helo=pettiford.lan) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1nAEkM-0003wC-DP; Wed, 19 Jan 2022 12:27:47 -0500 From: Hugo Villeneuve To: Alessandro Zummo , Alexandre Belloni Cc: hugo@hugovil.com, Hugo Villeneuve , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 19 Jan 2022 12:27:39 -0500 Message-Id: <20220119172740.1856302-1-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 70.80.174.168 X-SA-Exim-Mail-From: hugo@hugovil.com Subject: [PATCH] rtc: pcf2127: add error message if writing to CLKOUT register fails X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Hugo Villeneuve If writing to CLKOUT register fails, the probe operation will be aborted without a meaningful error message. Signed-off-by: Hugo Villeneuve --- drivers/rtc/rtc-pcf2127.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c index 3d1f57e54372..823abe2a7147 100644 --- a/drivers/rtc/rtc-pcf2127.c +++ b/drivers/rtc/rtc-pcf2127.c @@ -717,8 +717,10 @@ static int pcf2127_probe(struct device *dev, struct re= gmap *regmap, if (!(val & PCF2127_BIT_CLKOUT_OTPR)) { ret =3D regmap_set_bits(pcf2127->regmap, PCF2127_REG_CLKOUT, PCF2127_BIT_CLKOUT_OTPR); - if (ret < 0) + if (ret < 0) { + dev_err(dev, "writing to CLKOUT register failed\n"); return ret; + } =20 msleep(100); } --=20 2.30.2