From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9ED05C433FE for ; Thu, 3 Nov 2022 02:51:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OxId/J5ELnp/gJzdYvOFbi7RDIlmvEdoWD0s7MwdSIM=; b=TP93TCZHWSQ4P3 D2PE5pXs26Kyn5kWkTL84OFpln9QKqEDtdOTEMkteeUHJLmRDSAo6tdVuyhBs6sMdK+oF3+IdUCUN AXk6PLMHVxcUapmDHcaDi86uYEjztZQS0MuN9jR1QN0b6smLBPBTOwz/86DxKclnjjVlB86BWZAj7 zc31CQZgbB2+2VFtF2+xNsGSIoH4gDu+IXKSkLyYY4IiB+PE/N+qnbkJALYJaO8/lgjiLmdofG4I2 kwKxcp6Fsyw5hax3/7l4Hu+RolngjR3zthTJ3b1dT0cYcBw9RyegLx5W5OXWFSf6FrI3rRsw45KXN 9z7Uk931TpM2zAUajz1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqQJF-00Fg2B-Ls; Thu, 03 Nov 2022 02:50:25 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqQJC-00Fg1T-FN; Thu, 03 Nov 2022 02:50:23 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id CA18FB825F2; Thu, 3 Nov 2022 02:50:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBB72C433C1; Thu, 3 Nov 2022 02:50:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1667443819; bh=1Xb1IbsQxSNdC1FhUMa7ArhE3num/nt0p4tiyUrNpbk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xe7FHmXbq3DFHk/A219wviEIAIS4Js2aIstNq6oHcV7ybI+jI60Z80JWzRGhbzrAK yXpXObeQXEJtgiQV2HNjwnv/RjB+lQgSUxpwjqKz+mOTrWUgAITFvpCFuqa67Stdtb QLq1CendIM3l4gOr24bg7X+xQhTXJPwhoL04Ogds= Date: Thu, 3 Nov 2022 03:51:15 +0100 From: Greg KH To: Zeng Heng Cc: jirislaby@kernel.org, f.fainelli@gmail.com, sbranden@broadcom.com, l.sanfilippo@kunbus.com, guomengqi3@huawei.com, rjui@broadcom.com, ilpo.jarvinen@linux.intel.com, bcm-kernel-feedback-list@broadcom.com, athierry@redhat.com, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, liwei391@huawei.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH] serial: 8250_bcm2835aux: return PTR_ERR when fail to acquire clk Message-ID: References: <20221023065053.4057108-1-zengheng4@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221023065053.4057108-1-zengheng4@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221102_195022_686429_636FA6A0 X-CRM114-Status: GOOD ( 16.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Oct 23, 2022 at 02:50:53PM +0800, Zeng Heng wrote: > Add error handling process when fail to acquire clk by > `devm_clk_get_optional`. > > Signed-off-by: Zeng Heng > --- > drivers/tty/serial/8250/8250_bcm2835aux.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/tty/serial/8250/8250_bcm2835aux.c b/drivers/tty/serial/8250/8250_bcm2835aux.c > index 15a2387a5b25..1c623e93232c 100644 > --- a/drivers/tty/serial/8250/8250_bcm2835aux.c > +++ b/drivers/tty/serial/8250/8250_bcm2835aux.c > @@ -119,6 +119,8 @@ static int bcm2835aux_serial_probe(struct platform_device *pdev) > > /* get the clock - this also enables the HW */ > data->clk = devm_clk_get_optional(&pdev->dev, NULL); > + if (IS_ERR(data->clk)) > + return PTR_ERR(data->clk); How was this tested to verify that it works properly? thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel