Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7284419rwl; Thu, 23 Mar 2023 02:00:36 -0700 (PDT) X-Google-Smtp-Source: AK7set97Nrfalk3b0NIv/2/HkFW7aRdu6V0AHmNr5FW+8XizpROGmuMYU1+3qjQ6KyHFUIJCHBfB X-Received: by 2002:a17:90b:1e4b:b0:23f:5c60:67b with SMTP id pi11-20020a17090b1e4b00b0023f5c60067bmr7425672pjb.5.1679562035524; Thu, 23 Mar 2023 02:00:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679562035; cv=none; d=google.com; s=arc-20160816; b=IC6nC8IuPJq8PNFCYRbIzG+lcjCjySVm9sOkgzvznqdkmjYbxBCyUCQaHUmbES776K 9tMVtYDDIf0El6fNX7B5uD9Ya40CSOTpjAhUmQETsy3R9bmzCYTKY5elCb+wgezXwEmo yukXOEzarpKu/O6Aaa/nZCCbUY14ETMk3IIb264OhY1iNIz5WJV7/OJJ/479rWC5617o RQqrd8yQQS4SMXQmpzwfzPj6YTd0kS3ub3LCKpqBacml+lCGvllEfGcarjR8a5aUYwUB ufw59qAqKLjcavZi1gH6lY40M+CosEqYu4jwSGPkGAZRu3PN3WaV41tuPKZrdT99Ej1U 4FEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=vlYds6UzcqS+9v3/F0rZRe6bOfqsdIBTaQvZgdI4u2c=; b=aj51YEWCdQhmvq7UQQCBBNxGVDAvMenZkn597WLns+0GGAKQE/jOz8wISknNXB1gVp 9YbMTN84CQdir4qw9FpG3T4nqVZg7gzbvdFiJ8FhrMJv3qzIuBKvSk8Ez0uGQvpw/F8y GsijKR0fSNKA3fE+3QbHIC/DRbt+KNazZoFMzmep+l/0y0S1fheogNccUFqF1d05YwNQ Piauf/0xfgaTdwrifJ+KiVxRm7zEP+I+cZ4KCO+4n31uKBBVplCpU3Y/Ce+w3cgJ/qjP Gm1Ok4/rUEudzTJcPy2BYknDQss6oFUD+krmjCVMSufIW5jjPMfeOuVJkXAp7/IiBMjQ tHmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VZzlWKVt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iz4-20020a170902ef8400b00192721d6a97si17328930plb.499.2023.03.23.02.00.21; Thu, 23 Mar 2023 02:00:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VZzlWKVt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229691AbjCWI74 (ORCPT + 99 others); Thu, 23 Mar 2023 04:59:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231446AbjCWI7u (ORCPT ); Thu, 23 Mar 2023 04:59:50 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5B0830E7; Thu, 23 Mar 2023 01:59:48 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 32N8xbdD061805; Thu, 23 Mar 2023 03:59:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1679561977; bh=vlYds6UzcqS+9v3/F0rZRe6bOfqsdIBTaQvZgdI4u2c=; h=From:To:CC:Subject:Date; b=VZzlWKVtDleJwYwUM/AAXdhAttqEKsPJONO/Pk6KYeak4XUDgUxzk76eATipmkx+w xvTsheHkZMrbkFu0DQgjOXMCxQ3mtoVJkjZo7wkeBtrVhpgmKWgiTKS09ua27wtaYI FKqhI9mihd5k91HXgPkMu9LPQjzDtmHO1jZSpO+g= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32N8xbQZ049521 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 23 Mar 2023 03:59:37 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 23 Mar 2023 03:59:37 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 23 Mar 2023 03:59:37 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 32N8xZlr027625; Thu, 23 Mar 2023 03:59:36 -0500 From: Dhruva Gole To: Alexandre Belloni CC: Vibhore Vardhan , Dhruva Gole , , Alessandro Zummo , , Nishanth Menon Subject: [PATCH V2] rtc: k3: handle errors while enabling wake irq Date: Thu, 23 Mar 2023 14:29:04 +0530 Message-ID: <20230323085904.957999-1-d-gole@ti.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Due to the potential failure of enable_irq_wake(), it would be better to return error if it fails. Fixes: b09d633575e5 ("rtc: Introduce ti-k3-rtc") Cc: Nishanth Menon Signed-off-by: Dhruva Gole --- Changelog: Address the comments from Alexandre Belloni V1 link: https://lore.kernel.org/linux-rtc/20230323081942.951542-1-d-gole@ti.com drivers/rtc/rtc-ti-k3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-ti-k3.c b/drivers/rtc/rtc-ti-k3.c index ba23163cc042..0d90fe923355 100644 --- a/drivers/rtc/rtc-ti-k3.c +++ b/drivers/rtc/rtc-ti-k3.c @@ -632,7 +632,8 @@ static int __maybe_unused ti_k3_rtc_suspend(struct device *dev) struct ti_k3_rtc *priv = dev_get_drvdata(dev); if (device_may_wakeup(dev)) - enable_irq_wake(priv->irq); + return enable_irq_wake(priv->irq); + return 0; } -- 2.25.1