diff options
author | Joe Perches <joe@perches.com> | 2013-02-03 17:28:11 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-04 18:22:34 (GMT) |
commit | 38673c8218a6bcaac97b0243089e33617e28f43f (patch) | |
tree | 6d591fbe322271bcc18711322bf954cc67cccfda /drivers/net/usb/sierra_net.c | |
parent | b2adaca92c63b9bb8beb021d554f656e387a7648 (diff) | |
download | linux-38673c8218a6bcaac97b0243089e33617e28f43f.tar.xz |
drivers: net: usb: Remove unnecessary alloc/OOM messages
alloc failures already get standardized OOM
messages and a dump_stack.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/sierra_net.c')
-rw-r--r-- | drivers/net/usb/sierra_net.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c index 453aa6c..79ab243 100644 --- a/drivers/net/usb/sierra_net.c +++ b/drivers/net/usb/sierra_net.c @@ -459,11 +459,9 @@ static void sierra_net_kevent(struct work_struct *work) /* Query the modem for the LSI message */ buf = kzalloc(SIERRA_NET_USBCTL_BUF_LEN, GFP_KERNEL); - if (!buf) { - netdev_err(dev->net, - "failed to allocate buf for LS msg\n"); + if (!buf) return; - } + ifnum = priv->ifnum; len = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), USB_CDC_GET_ENCAPSULATED_RESPONSE, @@ -686,10 +684,8 @@ static int sierra_net_bind(struct usbnet *dev, struct usb_interface *intf) } /* Initialize sierra private data */ priv = kzalloc(sizeof *priv, GFP_KERNEL); - if (!priv) { - dev_err(&dev->udev->dev, "No memory"); + if (!priv) return -ENOMEM; - } priv->usbnet = dev; priv->ifnum = ifacenum; |