mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-12 16:19:53 +00:00
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>
This commit is contained in:
parent
444634f5ed
commit
5841b90337
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user