]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: dp83867: fix get nvmem cell fail
authorNikita Shubin <n.shubin@yadro.com>
Fri, 5 Aug 2022 08:48:43 +0000 (11:48 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 9 Aug 2022 03:57:03 +0000 (20:57 -0700)
commit8792a86cd48294879c173585a5adf9391fbe5087
tree2b1575acb85aadf55bb7caa1900cdf8b9d86f3ba
parent35a50e98629c4b4bd501820060c953ded119d352
net: phy: dp83867: fix get nvmem cell fail

If CONFIG_NVMEM is not set of_nvmem_cell_get, of_nvmem_device_get
functions will return ERR_PTR(-EOPNOTSUPP) and "failed to get nvmem
cell io_impedance_ctrl" error would be reported despite "io_impedance_ctrl"
is completely missing in Device Tree and we should use default values.

Check -EOPNOTSUPP togather with -ENOENT to avoid this situation.

Fixes: 825ec515cb5b ("net: phy: dp83867: implement support for io_impedance_ctrl nvmem cell")
Signed-off-by: Nikita Shubin <n.shubin@yadro.com>
Acked-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220805084843.24542-1-nikita.shubin@maquefel.me
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/dp83867.c