mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
spi: fsl-(e)spi: Fix checking return value of devm_ioremap_resource
devm_ioremap_resource() returns ERR_PTR on error. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
e9abb4db8d
commit
37c5db7938
2 changed files with 4 additions and 4 deletions
|
|
@ -674,8 +674,8 @@ static struct spi_master * fsl_espi_probe(struct device *dev,
|
|||
mpc8xxx_spi = spi_master_get_devdata(master);
|
||||
|
||||
mpc8xxx_spi->reg_base = devm_ioremap_resource(dev, mem);
|
||||
if (!mpc8xxx_spi->reg_base) {
|
||||
ret = -ENOMEM;
|
||||
if (IS_ERR(mpc8xxx_spi->reg_base)) {
|
||||
ret = PTR_ERR(mpc8xxx_spi->reg_base);
|
||||
goto err_probe;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -633,8 +633,8 @@ static struct spi_master * fsl_spi_probe(struct device *dev,
|
|||
goto err_cpm_init;
|
||||
|
||||
mpc8xxx_spi->reg_base = devm_ioremap_resource(dev, mem);
|
||||
if (mpc8xxx_spi->reg_base == NULL) {
|
||||
ret = -ENOMEM;
|
||||
if (IS_ERR(mpc8xxx_spi->reg_base)) {
|
||||
ret = PTR_ERR(mpc8xxx_spi->reg_base);
|
||||
goto err_probe;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue