Re: [PATCH v3 3/8] platform/x86: serdev_helpers: Check for serial_ctrl_uid == NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 04, 2024 at 09:42:14PM +0100, Hans de Goede wrote:
> dell_uart_bl_pdev_probe() calls get_serdev_controller() with the
> serial_ctrl_uid parameter set to NULL.
> 
> In case of errors this NULL parameter then gets passed to pr_err()
> as argument matching a "%s" conversion specification. This leads to
> compiler warnings when building with "make W=1".
> 
> Check serial_ctrl_uid before passing it to pr_err() to avoid these.

Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>

...

> +		       serial_ctrl_hid, serial_ctrl_uid ?: "*");

Not sure about '*' as it would mean 'any', perhaps 'none', '-', or 'undefined'
would be better, but since they are error messages, it's not so critical.

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux