X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fthermal%2Fdove_thermal.c;h=828f5e345c303ef9b15662477dfd01d16c8a96f6;hb=e7cd7886ef0478aaab23f445e2e8cd6e0e6bdd73;hp=900479e69ccb48dda9af8dd62f2d982cae528f33;hpb=a1cf1150f127f78783f86c695f10337391fc8092;p=karo-tx-linux.git diff --git a/drivers/thermal/dove_thermal.c b/drivers/thermal/dove_thermal.c index 900479e69ccb..828f5e345c30 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); @@ -194,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, }, };