Re: [PATCH] HSI: omap_ssi_port: skip useless NULL pointer check
From: Rosen Penev
Date: Tue Mar 24 2026 - 18:55:37 EST
On Tue, Mar 24, 2026 at 12:21 PM Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
>
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> ssi->port is no longer dynamically allocated, so there is now a warning
> from clang about the check being always true:
>
> drivers/hsi/controllers/omap_ssi_port.c:1121:12: error: address of array 'ssi->port' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
> 1121 | if (!ssi->port || !omap_ssi->port) {
>
> Remove it, as was done in the hsi core code.
>
> Fixes: e61af3ca8933 ("hsi: hsi_core: use kzalloc_flex")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
https://lore.kernel.org/lkml/20260321034117.3746-1-rosenp@xxxxxxxxx/
Whichever makes it in is fine with me.
> ---
> drivers/hsi/controllers/omap_ssi_port.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c
> index 50dde968febe..73932d7257d3 100644
> --- a/drivers/hsi/controllers/omap_ssi_port.c
> +++ b/drivers/hsi/controllers/omap_ssi_port.c
> @@ -1118,7 +1118,7 @@ static int ssi_port_probe(struct platform_device *pd)
>
> dev_dbg(&pd->dev, "init ssi port...\n");
>
> - if (!ssi->port || !omap_ssi->port) {
> + if (!omap_ssi->port) {
> dev_err(&pd->dev, "ssi controller not initialized!\n");
> err = -ENODEV;
> goto error;
> --
> 2.39.5
>