]> git.baikalelectronics.ru Git - kernel.git/commit
phy: stm32: fix an error code in probe
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Oct 2022 09:25:06 +0000 (12:25 +0300)
committerVinod Koul <vkoul@kernel.org>
Mon, 17 Oct 2022 05:25:26 +0000 (10:55 +0530)
commit8695163b6e9bb40a6d7d2923bbbf83aa8601eec5
treef5c31db8e7cdd49078d239153760c86a1771b9c9
parent4aa2614b214c1d8a7fa332a8f5501cb3374d8804
phy: stm32: fix an error code in probe

If "index > usbphyc->nphys" is true then this returns success but it
should return -EINVAL.

Fixes: e2e1922d9754 ("phy: stm32: add support for STM32 USB PHY Controller (USBPHYC)")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/Y0kq8j6S+5nDdMpr@kili
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/st/phy-stm32-usbphyc.c