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>
1 parent f59bd53 commit b75cf99b9ef3864a9c626d7a168e32d530171c81
@Ahmad Fatoum Ahmad Fatoum authored on 10 Feb 2020
Sascha Hauer committed on 12 Feb 2020
Showing 1 changed file
View
drivers/net/designware_socfpga.c