amd-xgbe: Checkpatch fixes
authorLendacky, Thomas <Thomas.Lendacky@amd.com>
Fri, 16 Jan 2015 18:46:24 +0000 (12:46 -0600)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Jan 2015 03:24:19 +0000 (22:24 -0500)
This set of patches resolves some checks reported by the checkpatch
tool.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c

index 76479d04b9037370ebb91cd161574c793eaf881b..2c063b60db4b02bc48246887fb5d98f6b3de0394 100644 (file)
@@ -328,7 +328,7 @@ void xgbe_debugfs_init(struct xgbe_prv_data *pdata)
 
        buf = kasprintf(GFP_KERNEL, "amd-xgbe-%s", pdata->netdev->name);
        pdata->xgbe_debugfs = debugfs_create_dir(buf, NULL);
-       if (pdata->xgbe_debugfs == NULL) {
+       if (!pdata->xgbe_debugfs) {
                netdev_err(pdata->netdev, "debugfs_create_dir failed\n");
                return;
        }
index 2ba1dd22ad648b55545a1ee924a204895484df93..e2e921768185476795e407bf23d766a1a2edd2b7 100644 (file)
@@ -692,7 +692,7 @@ static void xgbe_adjust_link(struct net_device *netdev)
        struct phy_device *phydev = pdata->phydev;
        int new_state = 0;
 
-       if (phydev == NULL)
+       if (!phydev)
                return;
 
        if (phydev->link) {
index 363b210560f332e08837e9bfb9426dcea62707a4..7eeb03d271e2da9813a675e2a51f0814a995f332 100644 (file)
@@ -220,7 +220,7 @@ int xgbe_mdio_register(struct xgbe_prv_data *pdata)
        }
 
        mii = mdiobus_alloc();
-       if (mii == NULL) {
+       if (!mii) {
                dev_err(pdata->dev, "mdiobus_alloc failed\n");
                ret = -ENOMEM;
                goto err_node_get;