net: tsi108: use NULL for pointer-typed argument
authorJulia Lawall <julia.lawall@lip6.fr>
Sat, 23 Apr 2016 09:07:02 +0000 (11:07 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Apr 2016 05:10:26 +0000 (01:10 -0400)
The first argument of pci_free_consistent has type struct pci_dev *, so use
NULL instead of 0.

The semantic patch that performs this transformation is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@
pci_free_consistent(
- 0
+ NULL
  , ...)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/tundra/tsi108_eth.c

index 520cf50a3d5a14ed7621e8bd280ea2d0059ed8c1..01a77145a0fa487518b6233d5760d3a0a8866323 100644 (file)
@@ -1314,7 +1314,8 @@ static int tsi108_open(struct net_device *dev)
        data->txring = dma_zalloc_coherent(NULL, txring_size, &data->txdma,
                                           GFP_KERNEL);
        if (!data->txring) {
-               pci_free_consistent(0, rxring_size, data->rxring, data->rxdma);
+               pci_free_consistent(NULL, rxring_size, data->rxring,
+                                   data->rxdma);
                return -ENOMEM;
        }