Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6409612rwl; Thu, 29 Dec 2022 12:20:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXsIQhwNT3vfMJfjv1NNDU8sR0p4i4cFtsQNdlHNgZw+jhvNBmHTYZUPseZRfGj8JLnV/p6O X-Received: by 2002:a17:90b:254:b0:221:4b19:4d8 with SMTP id fz20-20020a17090b025400b002214b1904d8mr32510265pjb.6.1672345209057; Thu, 29 Dec 2022 12:20:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672345209; cv=none; d=google.com; s=arc-20160816; b=b3yA0U+/SkeNpfAzWYZaPSmgiEvpnAuKW/YJZy6JPU8Bfu9N9T4srk98xjIT7VID7G GnK+nsNqL6ukQcZ8gCWS6RASn1Slaafeutc9FfeFOhxjNu745JXuesqabwWUjHm/Sthm C7qSVKUrsHzUmAKCXTbBOjyw5fLoJYVmgrCO5QrNPRPBcS/fXXuc12M0V9bfYan4Z/iX f7b1l6HS0A/kGv23DjkF+kntM6ptPoob3fFYPMR+wRV/QBPNj4U3ezWCbJFTSHUWk/Gr Kwf57QMb3sDKq6PvdShcniEbdjyEuydsL2NdOH2yMl3YA3j0XtpQoMwPzk0A7vPf9iYs SqBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=yCrvUMiaM1ysyuucxNCsNzBzhB/9MHqn8LXTyjV4ad8=; b=NQZjKJEgfQa0ZuEtT+IcJ3c8O4XIvu10vgmZ2jycjp8Le5TZyTJ9jCl2oJtuLn4HIH RPGG5yXBJF73sc3MplPryizHS+fZaznbv+aeM+jjWAEutIaex7JvAQmXrwCJlupVL40J CYi0GVZA0yuw/z+76NIsR9H0j03i2V2mak57zArj9wZyiceiFga8pAcS/uxS05oTuMID BQ0/UwoXsB0t6/L3pdW1zCYJj7Z9KZBov4vbNlsrpZ7kYjQ+qOoL8l4VLeWgwSnsuZHO MiDx9/GVT1YIXX7HzHZQMLBmhOoBlCiZaMnyM2iOi9Ie2dnlU4+4veFpnXtFqdhl7GXP bFQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Otu5AevE; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h15-20020a63210f000000b0046f3dfb9789si19679146pgh.477.2022.12.29.12.19.59; Thu, 29 Dec 2022 12:20:09 -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=@kernel.org header.s=k20201202 header.b=Otu5AevE; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233706AbiL2Tnj (ORCPT + 62 others); Thu, 29 Dec 2022 14:43:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229613AbiL2Tng (ORCPT ); Thu, 29 Dec 2022 14:43:36 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0893212ACC; Thu, 29 Dec 2022 11:43:36 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7E8DB618EB; Thu, 29 Dec 2022 19:43:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7C02C433EF; Thu, 29 Dec 2022 19:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672343014; bh=OF2QBuIivwLI2yVtSZKFRSp8bN1Ke056/VS/n7wByCg=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Otu5AevErYtodelmxt2WZnb1eqn6EdT//+dP2yuR13RAhiN1MJrCTglbBeMmPSNwB MDE5/NQGT46ucxCTLPQZxgunwaw0AruuMmpPBrsOLJl4H/xRgHLbcwE86e5XmTrGvL OnBeyUn4DOJKFf6LEciXysOfbtVpxTbdrGl1ZEZNdEU94p3OrITBgKIbbOwIMw4ABp i0RRmmw5yqeczQLPIQLgFFeua22UBxW+ybmhnD77bBnkmyweMI9Fv4inGJ28d6fe/7 fPQsv2lVfXT/UfAfML2KMroB4luuWyMsqH4GFEH+uG4MLiS4beGzXoP7JBmQcaEX/h Z2DXfow9d7hnw== Date: Thu, 29 Dec 2022 13:43:33 -0600 From: Bjorn Helgaas To: Aleksandr Burakov Cc: Yue Wang , Hanjie Lin , Lorenzo Pieralisi , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , linux-pci@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH] PCI: amlogic: The check for devm_add_action_or_reset's return value added Message-ID: <20221229194333.GA625014@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221220092137.6527-1-a.burakov@rosalinux.ru> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Hi Aleksandr, Thanks for the patch! On Tue, Dec 20, 2022 at 12:21:37PM +0300, Aleksandr Burakov wrote: > The return value of the function devm_add_action_or_reset() was not > checked hence an error code would not be returned. You can save Lorenzo and Krzysztof some work by: - Rewording the subject line in the typical " " imperative form, e.g., "Check for devm_add_action_or_reset() failure" - Rewording the commit log similarly. Note that the existing commit only describes the current situation and doesn't actually say what the patch does. Here's a good guide to commit logs: https://cbea.ms/git-commit/ > Fixes: 9c0ef6d34fdb ("PCI: amlogic: Add the Amlogic Meson PCIe controller driver") > Signed-off-by: Aleksandr Burakov > --- > drivers/pci/controller/dwc/pci-meson.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/controller/dwc/pci-meson.c b/drivers/pci/controller/dwc/pci-meson.c > index c1527693bed9..3d82f0b65480 100644 > --- a/drivers/pci/controller/dwc/pci-meson.c > +++ b/drivers/pci/controller/dwc/pci-meson.c > @@ -187,9 +187,13 @@ static inline struct clk *meson_pcie_probe_clock(struct device *dev, > return ERR_PTR(ret); > } > > - devm_add_action_or_reset(dev, > + ret = devm_add_action_or_reset(dev, > (void (*) (void *))clk_disable_unprepare, > clk); > + if (ret) { > + dev_err(dev, "couldn't reset clk\n"); > + return ERR_PTR(ret); > + } > > return clk; > } > -- > 2.25.1 >