summaryrefslogtreecommitdiff
path: root/drivers/thermal/kirkwood_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/kirkwood_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/kirkwood_thermal.c')
-rw-r--r--drivers/thermal/kirkwood_thermal.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/thermal/kirkwood_thermal.c b/drivers/thermal/kirkwood_thermal.c
index dfeceaffbc03..9e4d98eef17a 100644
--- a/drivers/thermal/kirkwood_thermal.c
+++ b/drivers/thermal/kirkwood_thermal.c
@@ -75,16 +75,11 @@ static int kirkwood_thermal_probe(struct platform_device *pdev)
struct kirkwood_thermal_priv *priv;
struct resource *res;
- 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);