drivers: phy: Handle gracefully NULL pointers
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Tue, 1 Oct 2019 12:03:26 +0000 (14:03 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 31 Oct 2019 11:22:53 +0000 (07:22 -0400)
commit4e1842988364446ba0cf2171d1eebb53c15bc44e
treedc5536f60fab7fc0a5ab37106c09c4302cd97c3d
parent2ad98ab8f68c71e2db140c6d5f1020aa6fbacb9e
drivers: phy: Handle gracefully NULL pointers

For some controllers PHYs can be optional. Handling NULL pointers without
crashing nor failing, makes it easy to handle optional PHYs.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
drivers/phy/phy-uclass.c
include/generic-phy.h