On Sun, Oct 18, 2026 at 02:19:25PM +0530, pavankumaryalagada@gmail.com wrote:
From: Yalagada Pavan Kumar pavankumaryalagada@gmail.com
Use %pe to print the error pointer directly and display its error name.
Keep PTR_ERR() calls when the numeric error value is needed for returning the error code.
Signed-off-by: Yalagada Pavan Kumar pavankumaryalagada@gmail.com Reviewed-by: Alex Elder elder@riscstar.com
v5:
- Drop arche-apb-ctrl.c and arche-platform.c changes because the files were removed.
- keep only the uart.c change, as the fw-core.c changes are already present in staging/staging-next.
The commit summary (Subject) is a bit misleading now.
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c index d47f00751e7a..74c9898c0eed 100644 --- a/drivers/staging/greybus/uart.c +++ b/drivers/staging/greybus/uart.c @@ -956,7 +956,7 @@ static int gb_tty_init(void) gb_tty_driver = tty_alloc_driver(GB_NUM_MINORS, TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV); if (IS_ERR(gb_tty_driver)) {
pr_err("Can not allocate tty driver\n");
pr_err("Can not allocate tty driver: %pe\n", gb_tty_driver);
There's really no need to print the errno here as it will always be -ENOMEM if we ever hit it. You could even remove the error message completely.
retval = PTR_ERR(gb_tty_driver); goto fail_unregister_dev;}
Johan