From: Christopher Diaz Riveros Date: Tue, 20 Feb 2018 16:30:33 +0000 (-0500) Subject: staging: net: netlogic: Remove unneeded cast X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5841b903371e830fb5b75dc917998277ca7d4ee6;p=linux.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index 30532d8c310b3..e461168313bf9 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;