Skip to content

Commit b8203ec

Browse files
Yang Livinodkoul
authored andcommitted
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: c9f9eba ("phy: ti: j721e-wiz: Manage typec-gpio-dir") Signed-off-by: Yang Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent aaac9a1 commit b8203ec

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/phy/ti/phy-j721e-wiz.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,7 @@ static int wiz_probe(struct platform_device *pdev)
12121212

12131213
if (wiz->typec_dir_delay < WIZ_TYPEC_DIR_DEBOUNCE_MIN ||
12141214
wiz->typec_dir_delay > WIZ_TYPEC_DIR_DEBOUNCE_MAX) {
1215+
ret = -EINVAL;
12151216
dev_err(dev, "Invalid typec-dir-debounce property\n");
12161217
goto err_addr_to_resource;
12171218
}

0 commit comments

Comments
 (0)