diff mbox series

[v1,1/4] soc/tegra: fuse: Clear fuse->clk on driver probe failure

Message ID 20210802221336.32016-2-digetx@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show
Series Tegra FUSE clock improvements for 5.15 | expand

Commit Message

Dmitry Osipenko Aug. 2, 2021, 10:13 p.m. UTC
The fuse->clk must be cleared if FUSE driver fails to probe, otherwise
tegra_fuse_readl() will crash. It's unlikely to happen in practice,
nevertheless let's correct it for completeness.

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


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;
+	fuse->clk = NULL;
 	fuse->base = base;
 	return err;