X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Fthermal%2Fkirkwood_thermal.c;h=3b034a0dfc9426ad48018699772fc024163156b6;hb=e7cd7886ef0478aaab23f445e2e8cd6e0e6bdd73;hp=61bbc2605b0251afc7c44417a044cec14bf5c973;hpb=5454f211ddc2a8ebc1eb20aa3866c4e9cf11405f;p=~andy%2Flinux diff --git a/drivers/thermal/kirkwood_thermal.c b/drivers/thermal/kirkwood_thermal.c index 61bbc2605b0..3b034a0dfc9 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); @@ -108,7 +103,6 @@ static int kirkwood_thermal_exit(struct platform_device *pdev) platform_get_drvdata(pdev); thermal_zone_device_unregister(kirkwood_thermal); - platform_set_drvdata(pdev, NULL); return 0; }