From: Christophe JAILLET Date: Wed, 31 Aug 2016 13:45:04 +0000 (-0300) Subject: [media] s5p-cec: Fix memory allocation failure check X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6e7122a3c83ad468037e7f22f324feccb6252bf4;p=linux-beck.git [media] s5p-cec: Fix memory allocation failure check It is likely that checking the result of the memory allocation just above is expected here. Signed-off-by: Christophe JAILLET Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/s5p-cec/s5p_cec.c b/drivers/staging/media/s5p-cec/s5p_cec.c index 77d9887801b8..1780a08b73c9 100644 --- a/drivers/staging/media/s5p-cec/s5p_cec.c +++ b/drivers/staging/media/s5p-cec/s5p_cec.c @@ -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;