mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 05:27:07 +02:00
tty: serial: meson: use dev_err_probe
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@sberdevices.ru> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20230705181833.16137-2-ddrokosov@sberdevices.ru Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c563831ba8
commit
b6092f36a5
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user