Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f51c810 authored by Wei Yongjun's avatar Wei Yongjun Committed by Mark Brown
Browse files

spi: spi-s3c24xx: 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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent c9f722e8
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -560,14 +560,7 @@ static int s3c24xx_spi_probe(struct platform_device *pdev)
	dev_dbg(hw->dev, "bitbang at %p\n", &hw->bitbang);

	/* find and map our resources */

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (res == NULL) {
		dev_err(&pdev->dev, "Cannot get IORESOURCE_MEM\n");
		err = -ENOENT;
		goto err_no_pdata;
	}

	hw->regs = devm_ioremap_resource(&pdev->dev, res);
	if (IS_ERR(hw->regs)) {
		err = PTR_ERR(hw->regs);