Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[firefly-linux-kernel-4.4.55.git] / drivers / net / ethernet / sun / sunbmac.c
index be82f6d13c5199228053ca37a69f847821542f35..054975939a184cc48035009420e8d1663871b0f9 100644 (file)
@@ -1042,8 +1042,8 @@ static void bigmac_set_multicast(struct net_device *dev)
 /* Ethtool support... */
 static void bigmac_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 {
-       strcpy(info->driver, "sunbmac");
-       strcpy(info->version, "2.0");
+       strlcpy(info->driver, "sunbmac", sizeof(info->driver));
+       strlcpy(info->version, "2.0", sizeof(info->version));
 }
 
 static u32 bigmac_get_link(struct net_device *dev)
@@ -1169,10 +1169,8 @@ static int bigmac_ether_init(struct platform_device *op,
        bp->bmac_block = dma_alloc_coherent(&bp->bigmac_op->dev,
                                            PAGE_SIZE,
                                            &bp->bblock_dvma, GFP_ATOMIC);
-       if (bp->bmac_block == NULL || bp->bblock_dvma == 0) {
-               printk(KERN_ERR "BIGMAC: Cannot allocate consistent DMA.\n");
+       if (bp->bmac_block == NULL || bp->bblock_dvma == 0)
                goto fail_and_cleanup;
-       }
 
        /* Get the board revision of this BigMAC. */
        bp->board_rev = of_getintprop_default(bp->bigmac_op->dev.of_node,