[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <5685B8AD.7010900@users.sourceforge.net>
Date: Fri, 1 Jan 2016 00:22:21 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: netdev@...r.kernel.org,
Ajit Khaparde <ajit.khaparde@...gotech.com>,
Padmanabh Ratnakar <padmanabh.ratnakar@...gotech.com>,
Sathya Perla <sathya.perla@...gotech.com>,
Sriharsha Basavapatna <sriharsha.basavapatna@...gotech.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH] be2net: Delete an unnecessary check in two functions
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Fri, 1 Jan 2016 00:11:57 +0100
Remove two checks for null pointers which would be handled by usual
error detection before.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/net/ethernet/emulex/benet/be_cmds.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index b63d8ad..ba98297 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -4366,9 +4366,7 @@ int be_cmd_get_profile_config(struct be_adapter *adapter,
if (vf_res)
res->vf_if_cap_flags = vf_res->cap_flags;
err:
- if (cmd.va)
- dma_free_coherent(&adapter->pdev->dev, cmd.size, cmd.va,
- cmd.dma);
+ dma_free_coherent(&adapter->pdev->dev, cmd.size, cmd.va, cmd.dma);
return status;
}
@@ -4398,10 +4396,7 @@ static int be_cmd_set_profile_config(struct be_adapter *adapter, void *desc,
memcpy(req->desc, desc, size);
status = be_cmd_notify_wait(adapter, &wrb);
-
- if (cmd.va)
- dma_free_coherent(&adapter->pdev->dev, cmd.size, cmd.va,
- cmd.dma);
+ dma_free_coherent(&adapter->pdev->dev, cmd.size, cmd.va, cmd.dma);
return status;
}
--
2.6.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists