[PATCH v7 22/37] soc/tegra: fuse: Clear fuse->clk on driver probe failure

From: Dmitry Osipenko
Date: Thu Jul 01 2021 - 19:29:41 EST


The fuse->clk must be cleared if FUSE driver fails to probe, otherwise
tegra_fuse_readl() will crash.

Signed-off-by: Dmitry Osipenko <digetx@xxxxxxxxx>
---
drivers/soc/tegra/fuse/fuse-tegra.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c
index 3d9da3d359da..2434c570b53c 100644
--- a/drivers/soc/tegra/fuse/fuse-tegra.c
+++ b/drivers/soc/tegra/fuse/fuse-tegra.c
@@ -246,6 +246,7 @@ static int tegra_fuse_probe(struct platform_device *pdev)
return 0;

restore:
+ fuse->clk = NULL;
fuse->base = base;
return err;
}
--
2.30.2