lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200422004151.116323-1-pmalani@chromium.org>
Date:   Tue, 21 Apr 2020 17:41:51 -0700
From:   Prashant Malani <pmalani@...omium.org>
To:     linux-kernel@...r.kernel.org
Cc:     Prashant Malani <pmalani@...omium.org>,
        Benson Leung <bleung@...omium.org>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Guenter Roeck <groeck@...omium.org>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Subject: [PATCH] platform/chrome: typec: Fix ret value check error

cros_typec_add_partner() returns 0 on success, so check for "ret"
instead of "!ret" as an error.

Signed-off-by: Prashant Malani <pmalani@...omium.org>
Fixes: 9d33ea331032 ("platform/chrome: cros_ec_typec: Register port partner")
---
 drivers/platform/chrome/cros_ec_typec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
index eda57db26f8d..66b8d21092af 100644
--- a/drivers/platform/chrome/cros_ec_typec.c
+++ b/drivers/platform/chrome/cros_ec_typec.c
@@ -263,7 +263,7 @@ static void cros_typec_set_port_params_v1(struct cros_typec_data *typec,
 
 		pd_en = resp->enabled & PD_CTRL_RESP_ENABLED_PD_CAPABLE;
 		ret = cros_typec_add_partner(typec, port_num, pd_en);
-		if (!ret)
+		if (ret)
 			dev_warn(typec->dev,
 				 "Failed to register partner on port: %d\n",
 				 port_num);
-- 
2.26.1.301.g55bc3eb7cb9-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ