Skip to content
Commit 13cd9ac6 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Rob Herring
Browse files

of: unittest: Drop if blocks with always false condition



unittest_gpio_remove() is only called after unittest_gpio_probe() completed
successfully. In this case driver data was set to a non-NULL value and so
platform_get_drvdata() never returns NULL.

Also note that the compiler might optimize away this check anyhow as
devptr was already dereferenced for the dev_dbg call above.

Drop this if block.

Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230319100620.295849-3-u.kleine-koenig@pengutronix.de


Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 5cdade2d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment