The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v1] tty: serial: samsung:Simplify with dev_err_probe()
@ 2024-08-30  3:32 Yu Jiaoliang
  2024-08-30  8:00 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Yu Jiaoliang @ 2024-08-30  3:32 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Alim Akhtar, Greg Kroah-Hartman, Jiri Slaby,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-serial
  Cc: opensource.kernel

Error handling in probe() can be a bit simpler with dev_err_probe().

Signed-off-by: Yu Jiaoliang <yujiaoliang@vivo.com>
---
 drivers/tty/serial/samsung_tty.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index c4f2ac9518aa..3550177010ad 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -1225,10 +1225,8 @@ static int s3c64xx_serial_startup(struct uart_port *port)
 
 	ret = request_irq(port->irq, s3c64xx_serial_handle_irq, IRQF_SHARED,
 			  s3c24xx_serial_portname(port), ourport);
-	if (ret) {
-		dev_err(port->dev, "cannot get irq %d\n", port->irq);
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(port->dev, port->irq, "cannot get irq\n");
 
 	/* For compatibility with s3c24xx Soc's */
 	ourport->rx_enabled = 1;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-30  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30  3:32 [PATCH v1] tty: serial: samsung:Simplify with dev_err_probe() Yu Jiaoliang
2024-08-30  8:00 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox