Skip to content

Commit

Permalink
amd-xgbe: Checkpatch fixes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lendacky, Thomas authored and David S. Miller committed Jan 17, 2015
1 parent 919d9db commit 1d67d7f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amd/xgbe/xgbe-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1d67d7f

Please sign in to comment.