From: Dan Carpenter Date: Thu, 26 May 2011 08:55:08 +0000 (-0300) Subject: [media] rc/redrat3: dereferencing null pointer X-Git-Tag: v3.12-rc1~5134^2~398 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7eb75715460026c82afd20e42ee51f4b30fe4bae;p=kernel%2Fkernel-generic.git [media] rc/redrat3: dereferencing null pointer In the original code, if the allocation failed we dereference "rr3" when it was NULL. Acked-by: Jarod Wilson Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 5147767..4582ef7 100644 --- a/drivers/media/rc/redrat3.c +++ b/drivers/media/rc/redrat3.c @@ -1186,7 +1186,7 @@ static int __devinit redrat3_dev_probe(struct usb_interface *intf, rr3 = kzalloc(sizeof(*rr3), GFP_KERNEL); if (rr3 == NULL) { dev_err(dev, "Memory allocation failure\n"); - goto error; + goto no_endpoints; } rr3->dev = &intf->dev;