From: Michael Walle Date: Mon, 4 Apr 2022 09:56:03 +0000 (+0200) Subject: soc: fsl: guts: machine variable might be unset X-Git-Tag: v4.19.256~229 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aae846fda6541300bf18d049634c0421d6863cdd;p=thirdparty%2Fkernel%2Fstable.git soc: fsl: guts: machine variable might be unset [ Upstream commit ab3f045774f704c4e7b6a878102f4e9d4ae7bc74 ] If both the model and the compatible properties are missing, then machine will not be set. Initialize it with NULL. Fixes: 34c1c21e94ac ("soc: fsl: fix section mismatch build warnings") Signed-off-by: Michael Walle Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo Signed-off-by: Sasha Levin --- diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c index 302e0c8d69d93..6693c32e74478 100644 --- a/drivers/soc/fsl/guts.c +++ b/drivers/soc/fsl/guts.c @@ -136,7 +136,7 @@ static int fsl_guts_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct resource *res; const struct fsl_soc_die_attr *soc_die; - const char *machine; + const char *machine = NULL; u32 svr; /* Initialize guts */