net: designware: socfpga: fix possible invalid pointer deref
In cases where the reset controller specification in the device tree is malformed, we get an error pointer back from reset_control_get. This compares unequal to NULL and would cause an access violation when passed to reset_control_(de)?assert. Fix this by propagating the error. When the reset controller is missing, reset_control_(de)?assert will be passed NULL pointers, rendering them no-ops. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> |
---|
|
drivers/net/designware_socfpga.c |
---|