staging: wfx: wfx_init_common() returns NULL on error
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Fri, 9 Oct 2020 17:13:03 +0000 (19:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Oct 2020 10:33:59 +0000 (12:33 +0200)
commitb3c669be90ddfa70409ab6335dadf3ef46473f9a
treee0806990935d0da1cb361a51b69bdfdf24ea9a43
parentbb97bc286171f58f3286c2d1da876c7a62708ea6
staging: wfx: wfx_init_common() returns NULL on error

Smatch complains:

    bus_spi.c:228 wfx_spi_probe() warn: 'bus->core' could be an error pointer
    bus_sdio.c:221 wfx_sdio_probe() warn: 'bus->core' could be an error pointer

bus->core contains the result of wfx_init_common(). With this patch,
wfx_init_common() returns a valid pointer or NULL.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20201009171307.864608-5-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/main.c