Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc/tegra: fuse: Warn if accessing unmapped registers

If the FUSE registers are accessed but the region is not mapped, warn
and return 0. This potentially catches hard to diagnose bugs because the
accesses happen before any kernel log output.

Signed-off-by: Thierry Reding <treding@nvidia.com>

+3
+3
drivers/soc/tegra/fuse/fuse-tegra30.c
··· 50 50 defined(CONFIG_ARCH_TEGRA_186_SOC) 51 51 static u32 tegra30_fuse_read_early(struct tegra_fuse *fuse, unsigned int offset) 52 52 { 53 + if (WARN_ON(!fuse->base)) 54 + return 0; 55 + 53 56 return readl_relaxed(fuse->base + FUSE_BEGIN + offset); 54 57 } 55 58