Re: [PATCH v2 1/1] serial: core: Fix error handling for serial_core_ctrl_device_add()

From: Jiri Slaby
Date: Fri Jun 02 2023 - 03:23:05 EST


On 02. 06. 23, 9:00, Tony Lindgren wrote:
Checking for NULL is incorrect as serial_base_ctrl_add() uses ERR_PTR().

Let's also pass any returned error along, there's no reason to translate
all errors to -ENODEV.

Fixes: 84a9582fd203 ("serial: core: Start managing serial controllers to enable runtime PM")
Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>

Reviewed-by: Jiri Slaby <jirislaby@xxxxxxxxxx>

thanks,
--
js
suse labs