From 7eb75715460026c82afd20e42ee51f4b30fe4bae Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 26 May 2011 05:55:08 -0300 Subject: [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 --- drivers/media/rc/redrat3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/rc/redrat3.c') diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 5147767ccb7..4582ef72d96 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; -- cgit v1.2.3-70-g09d2