diff options
author | Joe Perches <joe@perches.com> | 2013-02-03 17:28:14 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-04 13:22:34 -0500 |
commit | 0d2e7a5c608063f72048899d20505c2ee130566c (patch) | |
tree | 4eae4acaf7c04bb60337389aaef8065c00b1737a /drivers/net/wireless/p54/p54usb.c | |
parent | 9d11bd1592fba0b9231d3ce8ab61977db7e03e27 (diff) |
wireless: Remove unnecessary alloc/OOM messages, alloc cleanups
alloc failures already get standardized OOM
messages and a dump_stack.
Convert kzalloc's with multiplies to kcalloc.
Convert kmalloc's with multiplies to kmalloc_array.
Remove now unused variables.
Remove unnecessary memset after kzalloc->kcalloc.
Whitespace cleanups for these changes.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/p54/p54usb.c')
-rw-r--r-- | drivers/net/wireless/p54/p54usb.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index 800a16526c8..62ac6073753 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c @@ -510,11 +510,8 @@ static int p54u_upload_firmware_3887(struct ieee80211_hw *dev) return err; tmp = buf = kmalloc(P54U_FW_BLOCK, GFP_KERNEL); - if (!buf) { - dev_err(&priv->udev->dev, "(p54usb) cannot allocate firmware" - "upload buffer!\n"); + if (!buf) return -ENOMEM; - } left = block_size = min((size_t)P54U_FW_BLOCK, priv->fw->size); strcpy(buf, p54u_firmware_upload_3887); @@ -637,11 +634,8 @@ static int p54u_upload_firmware_net2280(struct ieee80211_hw *dev) const u8 *data; buf = kmalloc(512, GFP_KERNEL); - if (!buf) { - dev_err(&priv->udev->dev, "(p54usb) firmware buffer " - "alloc failed!\n"); + if (!buf) return -ENOMEM; - } #define P54U_WRITE(type, addr, data) \ do {\ |