]> git.baikalelectronics.ru Git - kernel.git/commit
spi: spi-amd: Fix a NULL vs IS_ERR() check in amd_spi_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 29 Apr 2020 02:54:26 +0000 (02:54 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 29 Apr 2020 17:52:15 +0000 (18:52 +0100)
commitd8e9862b612047fce876477354e7e1b3754e99ba
treee2b05715c0d8238dec6d40a7dbeea425dd79ee35
parent156ef2408b8a16de9b65f1ab3799b48b7b88865a
spi: spi-amd: Fix a NULL vs IS_ERR() check in amd_spi_probe()

In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Fixes: 3ddb9c4b0be3 ("spi: spi-amd: Add AMD SPI controller driver support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20200429025426.167664-1-weiyongjun1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-amd.c