spi: nuc900: remove redundant return value check of platform_get_resource()
Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
7519459da2
commit
fe2ece4a93
1 changed files with 0 additions and 6 deletions
|
@ -368,12 +368,6 @@ static int nuc900_spi_probe(struct platform_device *pdev)
|
||||||
hw->bitbang.txrx_bufs = nuc900_spi_txrx;
|
hw->bitbang.txrx_bufs = nuc900_spi_txrx;
|
||||||
|
|
||||||
hw->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
hw->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
if (hw->res == NULL) {
|
|
||||||
dev_err(&pdev->dev, "Cannot get IORESOURCE_MEM\n");
|
|
||||||
err = -ENOENT;
|
|
||||||
goto err_pdata;
|
|
||||||
}
|
|
||||||
|
|
||||||
hw->regs = devm_ioremap_resource(&pdev->dev, hw->res);
|
hw->regs = devm_ioremap_resource(&pdev->dev, hw->res);
|
||||||
if (IS_ERR(hw->regs)) {
|
if (IS_ERR(hw->regs)) {
|
||||||
err = PTR_ERR(hw->regs);
|
err = PTR_ERR(hw->regs);
|
||||||
|
|
Loading…
Reference in a new issue