ipmi: Fix NULL pointer dereference in ssif_probe
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Fri, 31 Aug 2018 15:00:34 +0000 (10:00 -0500)
committerCorey Minyard <cminyard@mvista.com>
Fri, 31 Aug 2018 19:13:56 +0000 (14:13 -0500)
commita8627cda7cfffe1792c199660c2b4f03ba2bd97b
tree17d597c0c73bea52c883c2b20808123679e2e5ab
parent0745dde62835be7e2afe62fcdb482fcad79cb743
ipmi: Fix NULL pointer dereference in ssif_probe

There is a potential execution path in which function ssif_info_find()
returns NULL, hence there is a NULL pointer dereference when accessing
pointer *addr_info*

Fix this by null checking *addr_info* before dereferencing it.

Addresses-Coverity-ID: 1473145 ("Explicit null dereferenced")
Fixes: e333054a91d1 ("ipmi: Fix I2C client removal in the SSIF driver")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_ssif.c