diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-05-15 11:34:21 +0200 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2019-09-22 22:44:52 +0200 |
commit | dd89d82e751473d13da0daea1bfb15d5634071c4 (patch) | |
tree | 8e1d2a1691b6a4264b3fb2363540b638b19fab01 /drivers/thermal | |
parent | Merge tag 'regulator-fix-v5.3-rc8' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
download | linux-dd89d82e751473d13da0daea1bfb15d5634071c4.tar.xz linux-dd89d82e751473d13da0daea1bfb15d5634071c4.zip |
thermal: thermal_mmio: remove some dead code
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>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/thermal_mmio.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/thermal/thermal_mmio.c b/drivers/thermal/thermal_mmio.c index de3cceea23bc..40524fa13533 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", |