amlogic: hifi4dsp: Fix null check
authorStricted <info@stricted.net>
Sat, 19 Jun 2021 22:52:22 +0000 (22:52 +0000)
committerNolen Johnson <johnsonnolen@gmail.com>
Tue, 21 Dec 2021 18:35:24 +0000 (13:35 -0500)
Change-Id: I3b8bc51863bb69662193d8e5e3f99f4319b81e65

drivers/amlogic/hifi4dsp/hifi4dsp_module.c

index 985463b0b0de7eeb1c04ba7d00872b22fae08d9a..707521568a69da492674a7c5a29014898d7968ec 100644 (file)
@@ -864,7 +864,7 @@ static int hifi4dsp_platform_probe(struct platform_device *pdev)
                HIFI4DSP_PRNT("kzalloc for p_dsp_miscdev error\n");
                goto miscdev_malloc_error;
        }
-       if (!&p_dsp_miscdev->dsp_miscdev)
+       if (&p_dsp_miscdev->dsp_miscdev == NULL)
                pr_info("register dsp _p_dsp_miscdev->dsp_miscdev alloc error\n");
        else
                pr_info("register dsp _p_dsp_miscdev->dsp_miscdev alloc success");