[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3beac94b-1a82-df36-1390-8321aa1a8e57@linaro.org>
Date: Thu, 6 Jul 2023 08:59:07 +0200
From: neil.armstrong@...aro.org
To: Dmitry Rokosov <ddrokosov@...rdevices.ru>,
gregkh@...uxfoundation.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
jbrunet@...libre.com, jirislaby@...nel.org, khilman@...libre.com,
martin.blumenstingl@...glemail.com
Cc: kelvin.zhang@...ogic.com, xianwei.zhao@...ogic.com,
kernel@...rdevices.ru, rockosov@...il.com,
linux-amlogic@...ts.infradead.org, linux-serial@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 1/7] tty: serial: meson: use dev_err_probe
On 05/07/2023 20:18, Dmitry Rokosov wrote:
> Use dev_err_probe() helper for error checking and standard logging.
> It makes the driver's probe() function a little bit shorter.
>
> Signed-off-by: Dmitry Rokosov <ddrokosov@...rdevices.ru>
> ---
> drivers/tty/serial/meson_uart.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
> index 2501db5a7aaf..bca54f3d92a1 100644
> --- a/drivers/tty/serial/meson_uart.c
> +++ b/drivers/tty/serial/meson_uart.c
> @@ -726,8 +726,8 @@ static int meson_uart_probe(struct platform_device *pdev)
> of_property_read_u32(pdev->dev.of_node, "fifo-size", &fifosize);
>
> if (meson_ports[pdev->id]) {
> - dev_err(&pdev->dev, "port %d already allocated\n", pdev->id);
> - return -EBUSY;
> + return dev_err_probe(&pdev->dev, -EBUSY,
> + "port %d already allocated\n", pdev->id);
> }
>
> port = devm_kzalloc(&pdev->dev, sizeof(struct uart_port), GFP_KERNEL);
Reviewed-by: Neil Armstrong <neil.armstrong@...aro.org>
Powered by blists - more mailing lists