summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/dove_thermal.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2013-05-10 08:17:11 +0000
committerZhang Rui <rui.zhang@intel.com>2013-05-20 23:35:52 +0800
commitc28f692c6f5a836dc628fb6990fb4d3d1859f779 (patch)
tree872ff7a727796c4eed8b6b7075b0b100299a321b /drivers/thermal/dove_thermal.c
parentc240a539df4e2d50f86e2f31813ff6b7334cd493 (diff)
drivers/thermal: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal/dove_thermal.c')
-rw-r--r--drivers/thermal/dove_thermal.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/thermal/dove_thermal.c b/drivers/thermal/dove_thermal.c
index 4b15a5f270d..8bf104d8a64 100644
--- a/drivers/thermal/dove_thermal.c
+++ b/drivers/thermal/dove_thermal.c
@@ -134,25 +134,16 @@ static int dove_thermal_probe(struct platform_device *pdev)
struct resource *res;
int ret;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev, "Failed to get platform resource\n");
- return -ENODEV;
- }
-
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->sensor = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(priv->sensor))
return PTR_ERR(priv->sensor);
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- if (!res) {
- dev_err(&pdev->dev, "Failed to get platform resource\n");
- return -ENODEV;
- }
priv->control = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(priv->control))
return PTR_ERR(priv->control);