Loading drivers/net/wan/cosa.c +4 −5 Original line number Diff line number Diff line Loading @@ -795,8 +795,8 @@ static ssize_t cosa_read(struct file *file, if (mutex_lock_interruptible(&chan->rlock)) return -ERESTARTSYS; if ((chan->rxdata = kmalloc(COSA_MTU, GFP_DMA|GFP_KERNEL)) == NULL) { pr_info("%s: cosa_read() - OOM\n", cosa->name); chan->rxdata = kmalloc(COSA_MTU, GFP_DMA|GFP_KERNEL); if (chan->rxdata == NULL) { mutex_unlock(&chan->rlock); return -ENOMEM; } Loading Loading @@ -874,9 +874,8 @@ static ssize_t cosa_write(struct file *file, count = COSA_MTU; /* Allocate the buffer */ if ((kbuf = kmalloc(count, GFP_KERNEL|GFP_DMA)) == NULL) { pr_notice("%s: cosa_write() OOM - dropping packet\n", cosa->name); kbuf = kmalloc(count, GFP_KERNEL|GFP_DMA); if (kbuf == NULL) { up(&chan->wsem); return -ENOMEM; } Loading drivers/net/wan/farsync.c +2 −4 Original line number Diff line number Diff line Loading @@ -2449,10 +2449,8 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) /* Allocate driver private data */ card = kzalloc(sizeof(struct fst_card_info), GFP_KERNEL); if (card == NULL) { pr_err("FarSync card found but insufficient memory for driver storage\n"); if (card == NULL) return -ENOMEM; } /* Try to enable the device */ if ((err = pci_enable_device(pdev)) != 0) { Loading drivers/net/wan/hdlc.c +4 −5 Original line number Diff line number Diff line Loading @@ -280,14 +280,13 @@ int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, if (!try_module_get(proto->module)) return -ENOSYS; if (size) if ((dev_to_hdlc(dev)->state = kmalloc(size, GFP_KERNEL)) == NULL) { netdev_warn(dev, "Memory squeeze on hdlc_proto_attach()\n"); if (size) { dev_to_hdlc(dev)->state = kmalloc(size, GFP_KERNEL); if (dev_to_hdlc(dev)->state == NULL) { module_put(proto->module); return -ENOBUFS; } } dev_to_hdlc(dev)->proto = proto; return 0; } Loading drivers/net/wan/x25_asy.c +0 −1 Original line number Diff line number Diff line Loading @@ -128,7 +128,6 @@ static int x25_asy_change_mtu(struct net_device *dev, int newmtu) rbuff = kmalloc(len + 4, GFP_ATOMIC); if (xbuff == NULL || rbuff == NULL) { netdev_warn(dev, "unable to grow X.25 buffers, MTU change cancelled\n"); kfree(xbuff); kfree(rbuff); return -ENOMEM; Loading Loading
drivers/net/wan/cosa.c +4 −5 Original line number Diff line number Diff line Loading @@ -795,8 +795,8 @@ static ssize_t cosa_read(struct file *file, if (mutex_lock_interruptible(&chan->rlock)) return -ERESTARTSYS; if ((chan->rxdata = kmalloc(COSA_MTU, GFP_DMA|GFP_KERNEL)) == NULL) { pr_info("%s: cosa_read() - OOM\n", cosa->name); chan->rxdata = kmalloc(COSA_MTU, GFP_DMA|GFP_KERNEL); if (chan->rxdata == NULL) { mutex_unlock(&chan->rlock); return -ENOMEM; } Loading Loading @@ -874,9 +874,8 @@ static ssize_t cosa_write(struct file *file, count = COSA_MTU; /* Allocate the buffer */ if ((kbuf = kmalloc(count, GFP_KERNEL|GFP_DMA)) == NULL) { pr_notice("%s: cosa_write() OOM - dropping packet\n", cosa->name); kbuf = kmalloc(count, GFP_KERNEL|GFP_DMA); if (kbuf == NULL) { up(&chan->wsem); return -ENOMEM; } Loading
drivers/net/wan/farsync.c +2 −4 Original line number Diff line number Diff line Loading @@ -2449,10 +2449,8 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) /* Allocate driver private data */ card = kzalloc(sizeof(struct fst_card_info), GFP_KERNEL); if (card == NULL) { pr_err("FarSync card found but insufficient memory for driver storage\n"); if (card == NULL) return -ENOMEM; } /* Try to enable the device */ if ((err = pci_enable_device(pdev)) != 0) { Loading
drivers/net/wan/hdlc.c +4 −5 Original line number Diff line number Diff line Loading @@ -280,14 +280,13 @@ int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, if (!try_module_get(proto->module)) return -ENOSYS; if (size) if ((dev_to_hdlc(dev)->state = kmalloc(size, GFP_KERNEL)) == NULL) { netdev_warn(dev, "Memory squeeze on hdlc_proto_attach()\n"); if (size) { dev_to_hdlc(dev)->state = kmalloc(size, GFP_KERNEL); if (dev_to_hdlc(dev)->state == NULL) { module_put(proto->module); return -ENOBUFS; } } dev_to_hdlc(dev)->proto = proto; return 0; } Loading
drivers/net/wan/x25_asy.c +0 −1 Original line number Diff line number Diff line Loading @@ -128,7 +128,6 @@ static int x25_asy_change_mtu(struct net_device *dev, int newmtu) rbuff = kmalloc(len + 4, GFP_ATOMIC); if (xbuff == NULL || rbuff == NULL) { netdev_warn(dev, "unable to grow X.25 buffers, MTU change cancelled\n"); kfree(xbuff); kfree(rbuff); return -ENOMEM; Loading