Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4258142pxj; Tue, 25 May 2021 04:03:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVxe0vmJldE9C4+9gVG6G6oUebFdVy85eI0wKwLy/+voAZYFxI4e3yIu3oOd+zBRoYg7Zb X-Received: by 2002:a05:6402:50d2:: with SMTP id h18mr31673095edb.10.1621940623159; Tue, 25 May 2021 04:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621940623; cv=none; d=google.com; s=arc-20160816; b=EyBFys7pEUaX0WGEo9OK3am/xhFwv6kO7KiyzKjU6q148jHaOL18G3pv4bnjAwSwTV E4jsVPl3FIiidBoXesdCY/cUp4zOnH7DEPmHbAQ8nxue+t6X2RMB6+5AH84S3F0TqXMq gxcplC2wT58a16RiSDl7LGhtrj6rtYhuiegkcBtuQ3dHvDj+aopUayVF0qktzn4pEych 9urRKu5RkIWBxy1I+pbQpql6ugUe9zlWKqB/kVA3AK6SwG5lP2D//C0Cr3va/4sr5EpZ YE5uhsiIlCuLcTGGc7QaU8yWj0/PnkAdXxX24JgoA9TPz5SLa4gOuvfLToCduIUgMHac ohCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=Gv/2VvrGbRR9nrFFpOf4WLadkuF8MIJBqQtsfM0U4Hw=; b=y4mUeXUVU9T5WFEneDwedHWOO8hh/LnTUNwbIm4kitaduKS49G3HlL3YhAmQ/ZwIS3 5YnCY9GgdD3Rc1McZjFTJLz9MGGUSI8CXrPj7Rdk5Y0wP5Z/sYmu4Y++tJAcBd1tCE5s 0c82rGKY3uSnG9cwOGwiyIWP4KiZxnQlC6iwfwsC1lO1vm+aTaSg4f91+hW8P42E7+PL H0ruI+vLxNz/LRbdIlwlw4aBUV2OwCtsFVBiMAglhQftif8ySGTT6BHfQphegPLfhNiX w7Y9ApzGg5dLOrtt/lb+gPJiT4M8RQrLh+EU7FCeY+EvQz84d58y7gX8M7hs/5v9jplh NeYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w14si11547804edd.111.2021.05.25.04.02.54; Tue, 25 May 2021 04:03:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231465AbhEYKwI (ORCPT + 99 others); Tue, 25 May 2021 06:52:08 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:41108 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231364AbhEYKwF (ORCPT ); Tue, 25 May 2021 06:52:05 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0Ua4PLBH_1621939834; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Ua4PLBH_1621939834) by smtp.aliyun-inc.com(127.0.0.1); Tue, 25 May 2021 18:50:35 +0800 From: Yang Li To: kishon@ti.com Cc: vkoul@kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] phy: ti: Fix an error code in wiz_probe() Date: Tue, 25 May 2021 18:50:32 +0800 Message-Id: <1621939832-65535-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Fixes: 'commit c9f9eba06629 ("phy: ti: j721e-wiz: Manage typec-gpio-dir")' Signed-off-by: Yang Li --- drivers/phy/ti/phy-j721e-wiz.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c index 9eb6d37..126f5b8 100644 --- a/drivers/phy/ti/phy-j721e-wiz.c +++ b/drivers/phy/ti/phy-j721e-wiz.c @@ -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; } -- 1.8.3.1