From: Greg KH <gregkh@linuxfoundation.org>
To: Zeng Heng <zengheng4@huawei.com>
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
Date: Thu, 3 Nov 2022 03:51:15 +0100 [thread overview]
Message-ID: <Y2Mso+AwtEURmPMI@kroah.com> (raw)
In-Reply-To: <20221023065053.4057108-1-zengheng4@huawei.com>
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 <zengheng4@huawei.com>
> ---
> 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
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: Zeng Heng <zengheng4@huawei.com>
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
Date: Thu, 3 Nov 2022 03:51:15 +0100 [thread overview]
Message-ID: <Y2Mso+AwtEURmPMI@kroah.com> (raw)
In-Reply-To: <20221023065053.4057108-1-zengheng4@huawei.com>
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 <zengheng4@huawei.com>
> ---
> 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
next prev parent reply other threads:[~2022-11-03 2:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-23 6:50 [PATCH] serial: 8250_bcm2835aux: return PTR_ERR when fail to acquire clk Zeng Heng
2022-10-23 6:50 ` Zeng Heng
2022-11-03 2:51 ` Greg KH [this message]
2022-11-03 2:51 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y2Mso+AwtEURmPMI@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=athierry@redhat.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=f.fainelli@gmail.com \
--cc=guomengqi3@huawei.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=l.sanfilippo@kunbus.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=liwei391@huawei.com \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=zengheng4@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.