From patchwork Mon Nov 7 09:25:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Katrin Jo X-Patchwork-Id: 16344 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1940087wru; Mon, 7 Nov 2022 01:31:09 -0800 (PST) X-Google-Smtp-Source: AMsMyM5osfAfNo4QDXj0T8ZQFAFoNPXCsBuoRda/REoV2IPikKDwFDT8rWLcIK3BUNOH1ipiS6Q6 X-Received: by 2002:a17:907:6d12:b0:7ae:3b9b:4554 with SMTP id sa18-20020a1709076d1200b007ae3b9b4554mr14356400ejc.307.1667813468890; Mon, 07 Nov 2022 01:31:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667813468; cv=none; d=google.com; s=arc-20160816; b=AAGjlui3VNdAhMaPP2paUkrbAdPASF2vmWnIkLHKGGQ8/0avp8zD90+stjCTPdaab3 t5A8mKu81igFVEqz+PANK8+WlbGthfBGKp7uE1OkUXnI3hD47VqSzdejKUZxOEYuyy9W jUvgO3IBa/eoYtLOzJ78nbZDaUpjk+4ysicjzPfUiVSYrB03neJPeabD46lI2tR98SZm TE43FCzKckP7UEB3KbpBovizora/+x5b7vT3b7C0lihxDmIgkExzbE+mfKPlqr5k1Kmb GlgwzgOYk2JMebBc/a1L0FEY1g3saOuTdJQfdTCvUFHJkAmyYJIzzjIu0MCj0yPpQJQ7 +mcw== 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=GRMJX6Xs+6P5gT0MFFl6yjITSLjz1MHRoDlRkuQ9VLY=; b=MVJHeLYSF15pvrvh6QYccW6BPox7JsVetC9aW69+Tc3cPjxohVQvBBpc7PMF8oPoVQ +M5XmfZAn8+/SB6UkRc/G6DCU84vqnrxpbli5a8kMUt3J4Nq0b/ISdOj7S/u5ESlDB7l 6FnpFtFaBFw/ZcBWPQG/LmqxfK9rmC2tm7bZI8r0klZS5eqXcoSgLMxfLQIYb4+AJYTP nZGSyHucNi1B/UG8gML7BkTbqcKum3RYfOIth5v7APfazoyUc4qHdLoIFgFbNSUnG4Ya +VlQhzeMK6p6IOtrwnStwZ+y12Vy+lOECQye+Ol6OAHbqdpbe/Pva4/4HIyTRW9p17Q2 5P4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Y4FOXWta; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hv13-20020a17090760cd00b007add164bc81si6176463ejc.222.2022.11.07.01.30.43; Mon, 07 Nov 2022 01:31:08 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=Y4FOXWta; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231297AbiKGJ0n (ORCPT + 99 others); Mon, 7 Nov 2022 04:26:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231865AbiKGJ0J (ORCPT ); Mon, 7 Nov 2022 04:26:09 -0500 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92B6217884; Mon, 7 Nov 2022 01:26:02 -0800 (PST) Received: by mail-pf1-x429.google.com with SMTP id y203so10052379pfb.4; Mon, 07 Nov 2022 01:26:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=GRMJX6Xs+6P5gT0MFFl6yjITSLjz1MHRoDlRkuQ9VLY=; b=Y4FOXWta3MnzzK0T7UKiHh66WuhZsN/61y79PVRxiNk0Clovk3k9SCy9ykUfCpkbV7 tsW8PVWtmz/3BN2qGHaNYKCqPjbaiVjL1hwW0de1pcI/d0q9xWKFjz2chl4rT3dgzPP0 nOp7m0yms4k0Yz7cXAkh/Ir8t15hpEpiy4YMmk0ae3/spzMlSjFQZ5ULW3aQGMR6Y7UJ T6ZRlMhMU5uUyYgnXqY1kKX0K/GSJyGQ5QPEZdhBvqLzJVuwXs19MKTxXaGB4cLj5iOh dEWVsrskTc28fdiiFMOahL6m+Ivmda0CYOmJez5nnVNCmQTj7v/VWuO02tAWdlJE6Oum 5AWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GRMJX6Xs+6P5gT0MFFl6yjITSLjz1MHRoDlRkuQ9VLY=; b=r6LbxhXmdgZiSh0T5u4sv6VPNvpCbg4M2iECX6FEPoTB9+eekWWHGd/+bAMWhsoTDy fQm9/alqmN5HlHWqgR1aUVzzhstkNhuKm0J5F9M4MuW3LjPslWwiI4ItZBSAPt4K6Wol dnUSisr52P5YceJTHVY+Dm0N8Yzfdzn99Xhu9Ael+3JE1oP3xvcLAv0PHEOl/894XGj7 3OAAK154UmikED2dI1vqg0wovJRBt7ituD4Lvrpbb6PZMxe6onvmyW1ggXshMjLUrV7l wPvLGdGRjBmkbPithDFYyPZDQuHBRomrTR79uq0LWKTeeYXgDssPHe2UXr+B9t40gMV/ 3DYQ== X-Gm-Message-State: ACrzQf3SG/nAuMDcaotZU6Fok/YWnMyT6qLuClxrRv+k3GVVMCK688bU 3HTy8zl5R3CGO2sZWbt4JH0= X-Received: by 2002:a63:1303:0:b0:46f:b44b:3519 with SMTP id i3-20020a631303000000b0046fb44b3519mr36221240pgl.278.1667813162096; Mon, 07 Nov 2022 01:26:02 -0800 (PST) Received: from localhost.localdomain ([43.132.141.3]) by smtp.gmail.com with ESMTPSA id q8-20020a170902a3c800b00186ffe62502sm4474361plb.254.2022.11.07.01.26.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 01:26:01 -0800 (PST) From: zys.zljxml@gmail.com To: miquel.raynal@bootlin.com, a.zummo@towertech.it, alexandre.belloni@bootlin.com, michel.pollet@bp.renesas.com Cc: linux-rtc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Yushan Zhou Subject: [PATCH] rtc: rzn1: Check return value in rzn1_rtc_probe Date: Mon, 7 Nov 2022 17:25:44 +0800 Message-Id: <20221107092544.3721053-1-zys.zljxml@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748829176194301252?= X-GMAIL-MSGID: =?utf-8?q?1748829176194301252?= From: Yushan Zhou The rzn1_rtc_probe() function utilizes devm_pm_runtime_enable() but wasn't checking the return value. Fix it by adding missing check. Fixes: deeb4b5393e1 ("rtc: rzn1: Add new RTC driver") Signed-off-by: Yushan Zhou Reviewed-by: Miquel Raynal --- drivers/rtc/rtc-rzn1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-rzn1.c b/drivers/rtc/rtc-rzn1.c index ac788799c8e3..0d36bc50197c 100644 --- a/drivers/rtc/rtc-rzn1.c +++ b/drivers/rtc/rtc-rzn1.c @@ -355,7 +355,9 @@ static int rzn1_rtc_probe(struct platform_device *pdev) set_bit(RTC_FEATURE_ALARM_RES_MINUTE, rtc->rtcdev->features); clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, rtc->rtcdev->features); - devm_pm_runtime_enable(&pdev->dev); + ret = devm_pm_runtime_enable(&pdev->dev); + if (ret < 0) + return ret; ret = pm_runtime_resume_and_get(&pdev->dev); if (ret < 0) return ret;