]> git.baikalelectronics.ru Git - kernel.git/commitdiff
soc: fsl: guts: machine variable might be unset
authorMichael Walle <michael@walle.cc>
Mon, 4 Apr 2022 09:56:03 +0000 (11:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:17:34 +0000 (11:17 +0200)
[ Upstream commit 964b99e17a5fd8259003e849ac235cdb9852ed56 ]

If both the model and the compatible properties are missing, then
machine will not be set. Initialize it with NULL.

Fixes: 7a5eb9cbbcb9 ("soc: fsl: fix section mismatch build warnings")
Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/fsl/guts.c

index 34810f9bb2ee781b3dbf96aa73326b2b5552a57f..2b7fb7a8805cd40cad26b149104fdff77af4ffa3 100644 (file)
@@ -142,7 +142,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 */