mtd: devices: docg3: check the return value of devm_ioremap() in the probe
authorWilliam Dean <williamsukatube@gmail.com>
Fri, 22 Jul 2022 09:16:44 +0000 (17:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:35:09 +0000 (12:35 +0200)
commit88263152ff5673d044960d7419f43d8a9f29c84b
tree09c471b6871134542372039ac8a263c200d7ad28
parenta0e4ac69889196a46683bff6e334e93a828e59b8
mtd: devices: docg3: check the return value of devm_ioremap() in the probe

[ Upstream commit 26e784433e6c65735cd6d93a8db52531970d9a60 ]

The function devm_ioremap() in docg3_probe() can fail, so
its return value should be checked.

Fixes: 82402aeb8c81e ("mtd: docg3: Use devm_*() functions")
Reported-by: Hacash Robot <hacashRobot@santino.com>
Signed-off-by: William Dean <williamsukatube@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220722091644.2937953-1-williamsukatube@163.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/devices/docg3.c