]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
net: mdio-mux: Fix NULL Comparison style
authorCorentin Labbe <clabbe.montjoie@gmail.com>
Fri, 1 Sep 2017 11:56:00 +0000 (13:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Sep 2017 17:26:31 +0000 (10:26 -0700)
This patch fix checkpatch warning about NULL Comparison style.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio-mux.c

index 942ceaf3fd3f4d3d999b3fdc044b0ee165e3bd8e..b18ad7082b882eb7985b7985f71056314d3576b0 100644 (file)
@@ -120,7 +120,7 @@ int mdio_mux_init(struct device *dev,
        }
 
        pb = devm_kzalloc(dev, sizeof(*pb), GFP_KERNEL);
-       if (pb == NULL) {
+       if (!pb) {
                ret_val = -ENOMEM;
                goto err_pb_kz;
        }
@@ -144,7 +144,7 @@ int mdio_mux_init(struct device *dev,
                }
 
                cb = devm_kzalloc(dev, sizeof(*cb), GFP_KERNEL);
-               if (cb == NULL) {
+               if (!cb) {
                        dev_err(dev,
                                "Error: Failed to allocate memory for child %pOF\n",
                                child_bus_node);