]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/thermal/dove_thermal.c
efs: iget_locked() doesn't return an ERR_PTR()
[karo-tx-linux.git] / drivers / thermal / dove_thermal.c
index a088d1365ca5ef287e46db053ba3625b8c536473..828f5e345c303ef9b15662477dfd01d16c8a96f6 100644 (file)
@@ -134,16 +134,11 @@ 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);
@@ -178,7 +173,6 @@ static int dove_thermal_exit(struct platform_device *pdev)
                platform_get_drvdata(pdev);
 
        thermal_zone_device_unregister(dove_thermal);
-       platform_set_drvdata(pdev, NULL);
 
        return 0;
 }
@@ -191,7 +185,7 @@ static struct platform_driver dove_thermal_driver = {
        .driver = {
                .name = "dove_thermal",
                .owner = THIS_MODULE,
-               .of_match_table = of_match_ptr(dove_thermal_id_table),
+               .of_match_table = dove_thermal_id_table,
        },
 };