]> git.dujemihanovic.xyz Git - u-boot.git/commit
power: regulator: Consistently return -ENOSYS when ops is unimplemented
authorJonas Karlman <jonas@kwiboo.se>
Wed, 24 Jul 2024 22:47:11 +0000 (22:47 +0000)
committerTom Rini <trini@konsulko.com>
Wed, 25 Sep 2024 14:54:03 +0000 (08:54 -0600)
commit4386ab9118e7b405829fbcb3bbbaf2f47ddf0b44
tree4c8cdacc3256876bd1afbece4b93c1de33d32cbb
parentf417c14d88fec5757dbf3cd6af6f7f2ddb99595f
power: regulator: Consistently return -ENOSYS when ops is unimplemented

dev_get_driver_ops() may return NULL when the udevice is invalid.

Move the ops check to top of functions to consistently return -ENOSYS
when ops is unimplemented and prevent trying to access uclass plat data,
also add missing NULL checks to suspend ops.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
drivers/power/regulator/regulator-uclass.c