phy: ti: Fix an error code in wiz_probe()
commitb8203ec7f5upstream. 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 <abaci@linux.alibaba.com> Fixes:c9f9eba066("phy: ti: j721e-wiz: Manage typec-gpio-dir") Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/1621939832-65535-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
62d891861f
commit
56a388a9cc
@@ -894,6 +894,7 @@ static int wiz_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
if (wiz->typec_dir_delay < WIZ_TYPEC_DIR_DEBOUNCE_MIN ||
|
if (wiz->typec_dir_delay < WIZ_TYPEC_DIR_DEBOUNCE_MIN ||
|
||||||
wiz->typec_dir_delay > WIZ_TYPEC_DIR_DEBOUNCE_MAX) {
|
wiz->typec_dir_delay > WIZ_TYPEC_DIR_DEBOUNCE_MAX) {
|
||||||
|
ret = -EINVAL;
|
||||||
dev_err(dev, "Invalid typec-dir-debounce property\n");
|
dev_err(dev, "Invalid typec-dir-debounce property\n");
|
||||||
goto err_addr_to_resource;
|
goto err_addr_to_resource;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user