phy: ti: Fix an error code in wiz_probe()
PATCH 1/1 phy: ti: Fix an error code in wiz_probe()
When the code execute this if statement, the value of ret is 0. However, we can see from the dev_err() log that the value of ret should be -EINVAL.
Clean up smatch warning:
drivers/phy/ti/phy-j721e-wiz.c:1216 wiz_probe() warn: missing error code 'ret'
Reported-by Abaci Robot <[email protected]>
Fixes 'commit c9f9eba06629 ("phy: ti: j721e-wiz: Manage
typec-gpio-dir")'
Signed-off-by Yang Li <[email protected]>
--- drivers/phy/ti/phy-j721e-wiz.c | 1 + 1 file changed, 1 insertion(+)
drivers/phy/ti/phy-j721e-wiz.c +1 -0
@@ -1212,6 +1212,7 @@ static int wiz_probe(struct platform_device *pdev)if (wiz->typec_dir_delay <WIZ_TYPEC_DIR_DEBOUNCE_MIN || wiz->typec_dir_delay >WIZ_TYPEC_DIR_DEBOUNCE_MAX ) { + ret = -EINVAL ;dev_err (dev,"Invalid typec-dir-debounce property\n" ); goto err_addr_to_resource; }
Signature · 1 line
1.8.3.1
Vinod Koul
maintainerQuoted 8 lines · Yang Li
When the code execute this if statement, the value of ret is 0. However, we can see from the
dev_err()log that the value of ret should be-EINVAL.Clean up smatch warning:
drivers/phy/ti/phy-j721e-wiz.c:1216wiz_probe()warn: missing error code 'ret'
Single line is fine for this
Quoted 4 lines
Reported-by Abaci Robot <[email protected]>Fixes 'commit c9f9eba06629 ("phy: ti: j721e-wiz: Managetypec-gpio-dir")'
Please dont split to two lines for fixes tag
Quoted 1 line
Signed-off-by Yang Li <[email protected]>
I have fixed while applying so Applied, thanks
Quoted 18 lines
--- drivers/phy/ti/phy-j721e-wiz.c | 1 + 1 file changed, 1 insertion(+)drivers/phy/ti/phy-j721e-wiz.c +1
-0@@ -1212,6 +1212,7 @@ static int wiz_probe(struct platform_device *pdev)if (wiz->typec_dir_delay <WIZ_TYPEC_DIR_DEBOUNCE_MIN || wiz->typec_dir_delay >WIZ_TYPEC_DIR_DEBOUNCE_MAX ) { + ret = -EINVAL ;dev_err (dev,"Invalid typec-dir-debounce property\n" ); goto err_addr_to_resource; }Signature · 1 line
1.8.3.1
Signature · 6 lines
~Vinod -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy