diff options
author | Dan Carpenter <error27@gmail.com> | 2011-05-26 04:55:08 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:52:24 -0400 |
commit | 7eb75715460026c82afd20e42ee51f4b30fe4bae (patch) | |
tree | 970d71f74f81c9d747abc5299450d168ec43931f /drivers/media/rc/redrat3.c | |
parent | 0528f354cfb98d8df32a76302ec07af1aa29dbd4 (diff) |
[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 <jarod@redhat.com>
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc/redrat3.c')
-rw-r--r-- | drivers/media/rc/redrat3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 5147767ccb78..4582ef72d963 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, | |||
1186 | rr3 = kzalloc(sizeof(*rr3), GFP_KERNEL); | 1186 | rr3 = kzalloc(sizeof(*rr3), GFP_KERNEL); |
1187 | if (rr3 == NULL) { | 1187 | if (rr3 == NULL) { |
1188 | dev_err(dev, "Memory allocation failure\n"); | 1188 | dev_err(dev, "Memory allocation failure\n"); |
1189 | goto error; | 1189 | goto no_endpoints; |
1190 | } | 1190 | } |
1191 | 1191 | ||
1192 | rr3->dev = &intf->dev; | 1192 | rr3->dev = &intf->dev; |