Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[firefly-linux-kernel-4.4.55.git] / drivers / net / ethernet / natsemi / macsonic.c
index 0ffde69c8d015e12db0e5943078b225fbfbd40e1..346a4e025c34100315b1ca2785d631d3bc5d3408 100644 (file)
@@ -202,13 +202,13 @@ static int macsonic_init(struct net_device *dev)
 
        /* Allocate the entire chunk of memory for the descriptors.
            Note that this cannot cross a 64K boundary. */
-       if ((lp->descriptors = dma_alloc_coherent(lp->device,
-                   SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
-                   &lp->descriptors_laddr, GFP_KERNEL)) == NULL) {
-               printk(KERN_ERR "%s: couldn't alloc DMA memory for descriptors.\n",
-                      dev_name(lp->device));
+       lp->descriptors = dma_alloc_coherent(lp->device,
+                                            SIZEOF_SONIC_DESC *
+                                            SONIC_BUS_SCALE(lp->dma_bitmode),
+                                            &lp->descriptors_laddr,
+                                            GFP_KERNEL);
+       if (lp->descriptors == NULL)
                return -ENOMEM;
-       }
 
        /* Now set up the pointers to point to the appropriate places */
        lp->cda = lp->descriptors;