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
| ||
|
Message-Id: <20210202224001.3810274-1-pmalani@chromium.org> Date: Tue, 2 Feb 2021 14:40:01 -0800 From: Prashant Malani <pmalani@...omium.org> To: linux-kernel@...r.kernel.org, heikki.krogerus@...ux.intel.com Cc: bleung@...omium.org, Prashant Malani <pmalani@...omium.org>, Enric Balletbo i Serra <enric.balletbo@...labora.com>, Guenter Roeck <groeck@...omium.org> Subject: [PATCH] platform/chrome: cros_ec_typec: Decouple partner removal Currently, we return if there is no partner present when !PD_CTRL_RESP_ENABLED_CONNECTED, without proceeding further. This ties partner removal to cable removal, whereas the two should be independent. Update the check to remove a partner if one was registered, but continue after that instead of returning. Signed-off-by: Prashant Malani <pmalani@...omium.org> --- drivers/platform/chrome/cros_ec_typec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index e724a5eaef1c..91b8fc1fd7f3 100644 --- a/drivers/platform/chrome/cros_ec_typec.c +++ b/drivers/platform/chrome/cros_ec_typec.c @@ -638,9 +638,8 @@ static void cros_typec_set_port_params_v1(struct cros_typec_data *typec, "Failed to register partner on port: %d\n", port_num); } else { - if (!typec->ports[port_num]->partner) - return; - cros_typec_remove_partner(typec, port_num); + if (typec->ports[port_num]->partner) + cros_typec_remove_partner(typec, port_num); if (typec->ports[port_num]->cable) cros_typec_remove_cable(typec, port_num); -- 2.30.0.365.g02bc693789-goog
Powered by blists - more mailing lists