summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Diaz Riveros <chrisadr@gentoo.org>2018-02-20 11:30:33 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-22 14:59:05 +0100
commit5841b903371e830fb5b75dc917998277ca7d4ee6 (patch)
tree1f8eb0c26cfdfd409eed5bd06a4e6463d4f442c9
parent444634f5ed6f0179cd63ff09bea62c03963ad0f9 (diff)
staging: net: netlogic: Remove unneeded cast
Fix Coccinelle alert: drivers/staging//netlogic/xlr_net.c:996:12-30: WARNING: casting value returned by memory allocation function to (struct xlr_adapter *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/netlogic/xlr_net.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c
index 30532d8c310b..e461168313bf 100644
--- a/drivers/staging/netlogic/xlr_net.c
+++ b/drivers/staging/netlogic/xlr_net.c
@@ -993,8 +993,7 @@ static int xlr_net_probe(struct platform_device *pdev)
/*
* Allocate our adapter data structure and attach it to the device.
*/
- adapter = (struct xlr_adapter *)
- devm_kzalloc(&pdev->dev, sizeof(*adapter), GFP_KERNEL);
+ adapter = devm_kzalloc(&pdev->dev, sizeof(*adapter), GFP_KERNEL);
if (!adapter)
return -ENOMEM;