Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357559
b: refs/heads/master
c: 535ec04
h: refs/heads/master
i:
  357557: 59ee0f7
  357555: 42723ae
  357551: 48d28fa
v: v3
  • Loading branch information
Joe Perches authored and Mauro Carvalho Chehab committed Feb 13, 2013
1 parent 16d4b32 commit b5a22fd
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d899eddde548b9a6d3a59d0600feaab377efcd3f
refs/heads/master: 535ec049e82e391dbe8be55ecd9f392acd71d0d7
4 changes: 1 addition & 3 deletions trunk/drivers/staging/media/as102/as102_usb_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,8 @@ static int as102_usb_probe(struct usb_interface *intf,
}

as102_dev = kzalloc(sizeof(struct as102_dev_t), GFP_KERNEL);
if (as102_dev == NULL) {
dev_err(&intf->dev, "%s: kzalloc failed\n", __func__);
if (as102_dev == NULL)
return -ENOMEM;
}

/* Assign the user-friendly device name */
for (i = 0; i < ARRAY_SIZE(as102_usb_id_table); i++) {
Expand Down
24 changes: 7 additions & 17 deletions trunk/drivers/staging/media/go7007/go7007-fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,8 @@ static int gen_mjpeghdr_to_package(struct go7007 *go, __le16 *code, int space)
int size = 0, i, off = 0, chunk;

buf = kzalloc(4096, GFP_KERNEL);
if (buf == NULL) {
dev_err(go->dev,
"unable to allocate 4096 bytes for firmware construction\n");
if (buf == NULL)
return -1;
}

for (i = 1; i < 32; ++i) {
mjpeg_frame_header(go, buf + size, i);
Expand Down Expand Up @@ -651,11 +648,9 @@ static int gen_mpeg1hdr_to_package(struct go7007 *go,
int i, off = 0, chunk;

buf = kzalloc(5120, GFP_KERNEL);
if (buf == NULL) {
dev_err(go->dev,
"unable to allocate 5120 bytes for firmware construction\n");
if (buf == NULL)
return -1;
}

framelen[0] = mpeg1_frame_header(go, buf, 0, 1, PFRAME);
if (go->interlace_coding)
framelen[0] += mpeg1_frame_header(go, buf + framelen[0] / 8,
Expand Down Expand Up @@ -838,11 +833,9 @@ static int gen_mpeg4hdr_to_package(struct go7007 *go,
int i, off = 0, chunk;

buf = kzalloc(5120, GFP_KERNEL);
if (buf == NULL) {
dev_err(go->dev,
"unable to allocate 5120 bytes for firmware construction\n");
if (buf == NULL)
return -1;
}

framelen[0] = mpeg4_frame_header(go, buf, 0, PFRAME);
i = 368;
framelen[1] = mpeg4_frame_header(go, buf + i, 0, BFRAME_PRE);
Expand Down Expand Up @@ -1582,12 +1575,9 @@ int go7007_construct_fw_image(struct go7007 *go, u8 **fw, int *fwlen)
return -1;
}
code = kzalloc(codespace * 2, GFP_KERNEL);
if (code == NULL) {
dev_err(go->dev,
"unable to allocate %d bytes for firmware construction\n",
codespace * 2);
if (code == NULL)
goto fw_failed;
}

src = (__le16 *)fw_entry->data;
srclen = fw_entry->size / 2;
while (srclen >= 2) {
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/staging/media/go7007/s2250-loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,9 @@ static int s2250loader_probe(struct usb_interface *interface,

/* Allocate dev data structure */
s = kmalloc(sizeof(device_extension_t), GFP_KERNEL);
if (s == NULL) {
dev_err(&interface->dev, "Out of memory\n");
if (s == NULL)
goto failed;
}

s2250_dev_table[minor] = s;

dev_info(&interface->dev,
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/staging/media/lirc/lirc_imon.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,6 @@ static int imon_probe(struct usb_interface *interface,

context = kzalloc(sizeof(struct imon_context), GFP_KERNEL);
if (!context) {
dev_err(dev, "%s: kzalloc failed for context\n", __func__);
alloc_status = 1;
goto alloc_status_switch;
}
Expand Down Expand Up @@ -826,13 +825,11 @@ static int imon_probe(struct usb_interface *interface,

driver = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL);
if (!driver) {
dev_err(dev, "%s: kzalloc failed for lirc_driver\n", __func__);
alloc_status = 2;
goto alloc_status_switch;
}
rbuf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL);
if (!rbuf) {
dev_err(dev, "%s: kmalloc failed for lirc_buffer\n", __func__);
alloc_status = 3;
goto alloc_status_switch;
}
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/staging/media/lirc/lirc_sasem.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,22 +759,16 @@ static int sasem_probe(struct usb_interface *interface,

context = kzalloc(sizeof(struct sasem_context), GFP_KERNEL);
if (!context) {
dev_err(&interface->dev,
"%s: kzalloc failed for context\n", __func__);
alloc_status = 1;
goto alloc_status_switch;
}
driver = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL);
if (!driver) {
dev_err(&interface->dev,
"%s: kzalloc failed for lirc_driver\n", __func__);
alloc_status = 2;
goto alloc_status_switch;
}
rbuf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL);
if (!rbuf) {
dev_err(&interface->dev,
"%s: kmalloc failed for lirc_buffer\n", __func__);
alloc_status = 3;
goto alloc_status_switch;
}
Expand Down

0 comments on commit b5a22fd

Please sign in to comment.