]> git.baikalelectronics.ru Git - kernel.git/commit
char: hpet: add checks after calling ioremap
authorTom Seewald <tseewald@gmail.com>
Mon, 3 May 2021 11:56:56 +0000 (13:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 May 2021 15:33:36 +0000 (17:33 +0200)
commitf9a688b1b819dcae056d82214faff70f3f50dbb8
treed91ea71ea837c5328e0927245b93c0fe9d7d0d9d
parent627101437bf6f8e0f017a6eed3235b48aebc54d9
char: hpet: add checks after calling ioremap

The function hpet_resources() calls ioremap() two times, but in both
cases it does not check if ioremap() returned a null pointer. Fix this
by adding null pointer checks and returning an appropriate error.

Signed-off-by: Tom Seewald <tseewald@gmail.com>
Link: https://lore.kernel.org/r/20210503115736.2104747-30-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/hpet.c