mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeremy Linton <jeremy.linton@arm.com>
To: Stefan Wahren <wahrenst@gmx.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Florian Fainelli <florian.fainelli@broadcom.com>
Cc: Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Adrien Thierry <athierry@redhat.com>,
	linux-serial@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] serial: 8250_bcm2835aux: Restore clock error handling
Date: Tue, 9 Jan 2024 18:01:58 -0600	[thread overview]
Message-ID: <1b0de096-101a-9764-0396-d8b86878badf@arm.com> (raw)
In-Reply-To: <20231220114334.4712-1-wahrenst@gmx.net>

Hi,


On 12/20/23 05:43, Stefan Wahren wrote:
> The commit fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support")
> dropped the error handling for clock acquiring. But even an optional
> clock needs this.

Right, the call was changed to _optional() during review but the error 
handling didn't get put back.

> 
> Fixes: fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support")
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
> ---
>   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..4f4502fb5454 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 dev_err_probe(&pdev->dev, PTR_ERR(data->clk), "could not get clk\n");
> 
>   	/* get the interrupt */
>   	ret = platform_get_irq(pdev, 0);
> --

And on ACPI machines it returns NULL, which passes the error check now, 
so it works on an ACPI based pi.

Thanks!

Reviewed-by: Jeremy Linton <jeremy.linton@arm.com>
Tested-by: Jeremy Linton <jeremy.linton@arm.com>



  parent reply	other threads:[~2024-01-10  0:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-20 11:43 Stefan Wahren
2024-01-03 17:33 ` Florian Fainelli
2024-01-10  0:01 ` Jeremy Linton [this message]
2024-01-10  8:49   ` Stefan Wahren

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=1b0de096-101a-9764-0396-d8b86878badf@arm.com \
    --to=jeremy.linton@arm.com \
    --cc=athierry@redhat.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=wahrenst@gmx.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®