]> git.baikalelectronics.ru Git - kernel.git/commit
net: fujitsu: fix potential null-ptr-deref
authorAnirudh Rayabharam <mail@anirudhrb.com>
Mon, 3 May 2021 11:56:42 +0000 (13:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 May 2021 15:30:31 +0000 (17:30 +0200)
commit447d6dd8bdebb11891c4e4bf4e44bc92a79dc1be
treee4d3a376272aad235f3e22f8c477640d5a61c113
parenta87ab09e585341dea9659727773c84e076e99537
net: fujitsu: fix potential null-ptr-deref

In fmvj18x_get_hwinfo(), if ioremap fails there will be NULL pointer
deref. To fix this, check the return value of ioremap and return -1
to the caller in case of failure.

Cc: "David S. Miller" <davem@davemloft.net>
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com>
Link: https://lore.kernel.org/r/20210503115736.2104747-16-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/fujitsu/fmvj18x_cs.c