reset: Do not register resource data for missing resets
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 20 Nov 2019 14:59:26 +0000 (15:59 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 10 Dec 2019 10:43:37 +0000 (11:43 +0100)
commitdb23808615e29d9a04f96806cac56f78b0fee0ef
tree1f281ab2c820c26fe28a1f50bb90ec7560052bd2
parent723c0011c7f6992f57e2c629fa9c89141acc115f
reset: Do not register resource data for missing resets

When an optional reset is not present, __devm_reset_control_get() and
devm_reset_control_array_get() still register resource data to release
the non-existing reset on cleanup, which is futile.

Fix this by skipping NULL reset control pointers.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/reset/core.c