thermal: qoriq: Fix error path of calling qoriq_tmu_register_tmu_zone fail
authorAnson Huang <Anson.Huang@nxp.com>
Tue, 30 Jul 2019 02:21:23 +0000 (10:21 +0800)
committerZhang Rui <rui.zhang@intel.com>
Wed, 28 Aug 2019 08:33:22 +0000 (16:33 +0800)
When registering tmu zone failed, the error path should be err_tmu
instead of err_iomap, as iounmap() needs to be called.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/qoriq_thermal.c

index 28939471ce16024c81ec343f6d3a1a0255581025..5755a1108a1f2ce1e0df15014a0a6ab2e012460e 100644 (file)
@@ -231,7 +231,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
        if (ret < 0) {
                dev_err(&pdev->dev, "Failed to register sensors\n");
                ret = -ENODEV;
-               goto err_iomap;
+               goto err_tmu;
        }
 
        return 0;