Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[firefly-linux-kernel-4.4.55.git] / drivers / net / ethernet / dlink / dl2k.c
index 1d342d37915cd1d45b8c00088079e6aef2b273fc..afa8e3af2c4d6840a9eee8c9c46d0e3f6df22a02 100644 (file)
@@ -580,12 +580,9 @@ alloc_list (struct net_device *dev)
 
                skb = netdev_alloc_skb_ip_align(dev, np->rx_buf_sz);
                np->rx_skbuff[i] = skb;
-               if (skb == NULL) {
-                       printk (KERN_ERR
-                               "%s: alloc_list: allocate Rx buffer error! ",
-                               dev->name);
+               if (skb == NULL)
                        break;
-               }
+
                /* Rubicon now supports 40 bits of addressing space. */
                np->rx_ring[i].fraginfo =
                    cpu_to_le64 ( pci_map_single (
@@ -1156,9 +1153,10 @@ set_multicast (struct net_device *dev)
 static void rio_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 {
        struct netdev_private *np = netdev_priv(dev);
-       strcpy(info->driver, "dl2k");
-       strcpy(info->version, DRV_VERSION);
-       strcpy(info->bus_info, pci_name(np->pdev));
+
+       strlcpy(info->driver, "dl2k", sizeof(info->driver));
+       strlcpy(info->version, DRV_VERSION, sizeof(info->version));
+       strlcpy(info->bus_info, pci_name(np->pdev), sizeof(info->bus_info));
 }
 
 static int rio_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)