aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-05-15 12:34:21 +0300
committerEduardo Valentin <edubezval@gmail.com>2019-06-02 20:23:02 -0700
commit4cb9f043447ebb3948aad78b5f9d12a0a7fac6ae (patch)
treea30e4f725b00c57c001b81a6440fd5f34e962b56
parentf2c7c76c5d0a443053e94adb9f0918fa2fb85c3a (diff)
downloadlinux-soc-thermal-for-kernelci.tar.gz
thermal: thermal_mmio: remove some dead codefor-kernelci
The platform_get_resource() function doesn't return error pointers, it returns NULL. The way this is normally done, is that we pass the NULL resource to devm_ioremap_resource() and then check for errors from that. See the comment in front of devm_ioremap_resource() for more details. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Talel Shenhar <talel@amazon.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
-rw-r--r--drivers/thermal/thermal_mmio.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/thermal/thermal_mmio.c b/drivers/thermal/thermal_mmio.c
index de3cceea23bc63..40524fa135337f 100644
--- a/drivers/thermal/thermal_mmio.c
+++ b/drivers/thermal/thermal_mmio.c
@@ -53,13 +53,6 @@ static int thermal_mmio_probe(struct platform_device *pdev)
return -ENOMEM;
resource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (IS_ERR(resource)) {
- dev_err(&pdev->dev,
- "fail to get platform memory resource (%ld)\n",
- PTR_ERR(resource));
- return PTR_ERR(resource);
- }
-
sensor->mmio_base = devm_ioremap_resource(&pdev->dev, resource);
if (IS_ERR(sensor->mmio_base)) {
dev_err(&pdev->dev, "failed to ioremap memory (%ld)\n",