]> git.baikalelectronics.ru Git - kernel.git/commit
spi: coldfire-qspi: fix error return code in mcfqspi_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Thu, 16 May 2013 05:11:32 +0000 (13:11 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 16 May 2013 18:21:50 +0000 (19:21 +0100)
commit29f1340b9089ad718c03c9173fac5a70dda5928d
treec668f6925c6a00c7d2bc279d0dcd0a99e6784a3b
parent8d558d708ac7028555343d7c77c3fa7aa5714f99
spi: coldfire-qspi: fix error return code in mcfqspi_probe()

If pdev->dev.platform_data is not set, mcfqspi_probe() will return 0
and release all the resources, in this case, we should return a error
code instead of 0.
This patch fix to return -ENOENT in this case and move the check for
pdev->dev.platform_data to the begin of this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/spi/spi-coldfire-qspi.c