[media] s5p-cec: Fix memory allocation failure check
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 31 Aug 2016 13:45:04 +0000 (10:45 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 22 Sep 2016 13:12:50 +0000 (10:12 -0300)
It is likely that checking the result of the memory allocation just above
is expected here.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/s5p-cec/s5p_cec.c

index 77d9887801b8dd9306616d4783b1a0757f8c6d44..1780a08b73c96193f063f4811ef5ee2a366ec5e3 100644 (file)
@@ -173,7 +173,7 @@ static int s5p_cec_probe(struct platform_device *pdev)
        int ret;
 
        cec = devm_kzalloc(&pdev->dev, sizeof(*cec), GFP_KERNEL);
-       if (!dev)
+       if (!cec)
                return -ENOMEM;
 
        cec->dev = dev;