Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341659
b: refs/heads/master
c: eed9a72
h: refs/heads/master
i:
  341657: f29709e
  341655: 0f2ddd9
v: v3
  • Loading branch information
Steve Glendinning authored and David S. Miller committed Nov 30, 2012
1 parent ec7946b commit 78c4b24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: e3c678e6d7484dc03fc36d3bfebb8ebb94574110
refs/heads/master: eed9a72914a2b2737a0d91b80579f878999574ef
7 changes: 6 additions & 1 deletion trunk/drivers/net/usb/smsc95xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
}

if (pdata->wolopts & (WAKE_BCAST | WAKE_MCAST | WAKE_ARP | WAKE_UCAST)) {
u32 *filter_mask = kzalloc(32, GFP_KERNEL);
u32 *filter_mask = kzalloc(sizeof(u32) * 32, GFP_KERNEL);
u32 command[2];
u32 offset[2];
u32 crc[4];
Expand All @@ -1290,6 +1290,11 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
LAN9500A_WUFF_NUM : LAN9500_WUFF_NUM;
int i, filter = 0;

if (!filter_mask) {
netdev_warn(dev->net, "Unable to allocate filter_mask\n");
return -ENOMEM;
}

memset(command, 0, sizeof(command));
memset(offset, 0, sizeof(offset));
memset(crc, 0, sizeof(crc));
Expand Down

0 comments on commit 78c4b24

Please sign in to comment.