commit | 956b7adf2f3b3b67367d710fef37ad3a6a3ffb59 | [log] [tgz] |
---|---|---|
author | Patrice Chotard <patrice.chotard@st.com> | Tue Jul 18 11:38:42 2017 +0200 |
committer | Marek Vasut <marex@denx.de> | Fri Jul 28 23:34:04 2017 +0200 |
tree | d6d6899965ad1075bf2411539182e4430545df14 | |
parent | 17b0887ae370a1bef4183120262a6cea41533b55 [diff] |
drivers: phy: Set phy->dev to NULL when generic_phy_get_by_index() fails phy->dev need to be set to NULL in case of generic_phy_get_by_index() fails. Then phy->dev can be used to check if the phy is valid Reported-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>