提交 5841b903 编写于 作者: C Christopher Diaz Riveros 提交者: Greg Kroah-Hartman

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: NChristopher Diaz Riveros <chrisadr@gentoo.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 444634f5
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册