Commit ce662ccd authored by Fabio Estevam's avatar Fabio Estevam Committed by Daniel Lezcano
Browse files

thermal: imx8mm: Print the correct error code



Currently the error message does not print the correct error code.

Fix it by initializing 'ret' to the proper error code.

Signed-off-by: default avatarFabio Estevam <festevam@gmail.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201202232448.2692-1-festevam@gmail.com
parent 1b57b959
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -166,10 +166,11 @@ static int imx8mm_tmu_probe(struct platform_device *pdev)
							     &tmu->sensors[i],
							     &tmu_tz_ops);
		if (IS_ERR(tmu->sensors[i].tzd)) {
			ret = PTR_ERR(tmu->sensors[i].tzd);
			dev_err(&pdev->dev,
				"failed to register thermal zone sensor[%d]: %d\n",
				i, ret);
			return PTR_ERR(tmu->sensors[i].tzd);
			return ret;
		}
		tmu->sensors[i].hw_id = i;
	}