Re: [PATCH] net: marvell: fix a missing check of acpi_match_device

2018-12-27 Thread David Miller
From: Kangjie Lu Date: Wed, 26 Dec 2018 00:31:08 -0600 > When acpi_match_device fails, its return value is NULL. Directly using > the return value without a check may result in a NULL-pointer > dereference. The fix checks if acpi_match_device fails, and if so, > returns -EINVAL. > > Signed-off-b

[PATCH] net: marvell: fix a missing check of acpi_match_device

2018-12-25 Thread Kangjie Lu
When acpi_match_device fails, its return value is NULL. Directly using the return value without a check may result in a NULL-pointer dereference. The fix checks if acpi_match_device fails, and if so, returns -EINVAL. Signed-off-by: Kangjie Lu --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c |