Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1023793ybe; Wed, 4 Sep 2019 11:18:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqye2R9t2bd5BSy6d2L/ssXMcVBjeBk6xaAlcOZZzrPht0UcjakY6t8MvS7fra9c/Recbqu5 X-Received: by 2002:a63:b346:: with SMTP id x6mr36701746pgt.218.1567621091136; Wed, 04 Sep 2019 11:18:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567621091; cv=none; d=google.com; s=arc-20160816; b=MZuc/ieMJfPQQe9QQo60IvQCGe05Rce2oDf4tn/zIy3BGfvYQmeH4eTPsXrvv2ns6F k3nZQuj7SCJHHTNIUFoxj1Yt2uO85V/1wOAQBpC9LzvHQTtiNqg+l+xGPEDk7wkUa3qM J59bqeMpGwxt6rJqWb4u9TTqrdLzSKvc977+BJW57imqrLab3XoxdZncwrHzwkiee3xm iSDx1+xtyEvm45jv4FaqiWR+5TrD0R8Cp6MeUzxyamCO+SnZ6jyYProec+2a2tSy1RWP Byvd7KR05l9qUpM8Arq7NtWLiF6jTFOzsF8auFl2a321/JzQi5RW4UgOoOByZFjodQ0M RqcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uObhp0XrjxEmbQVVvEenQkLJvZQ/vzyFUwSQelTU4R8=; b=rCs/xPn3ulACFdZTwG0UuFmYtX6etM2UFuDulN3AnwHmB0QOF4Ph2pppUDVXf02b8J JMSdp0ywTeuVbD0+hYNeyaxo9ww7pjpe6ZnBpIJOM5kBeMy7zilp0e+3KuMt5QBYZuZX CElIudS70zV00fOw3tVO/CrvJROcGX4dVvNFGayzIW6oDePJLys2/PnqnmPxB/hvnuxK pabsX7h3AIMCC5dhH5zXkVvFEMH+6dIlSrkJHS2DHmcFLtrcarzWrgcS8PwAq7iSWjcb 4QTInovPYdr7+yHuW063uEI6/6TOOvHqkprJARKP/Fe8+1J32SoJD9A2R/f/iZrwD+9y bFAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YG1SKKNE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fr17si2811720pjb.36.2019.09.04.11.17.55; Wed, 04 Sep 2019 11:18:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YG1SKKNE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390462AbfIDSOL (ORCPT + 99 others); Wed, 4 Sep 2019 14:14:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:59260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390734AbfIDSOK (ORCPT ); Wed, 4 Sep 2019 14:14:10 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BA0682087E; Wed, 4 Sep 2019 18:14:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620849; bh=42Ue3ROqGJcvhAgSPq8izBe8OHOarSjHQeq0zM3Nt3I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YG1SKKNE3iIjbj6Og0mm2o8Qf3sqfay1h3kbn3WVneNLxUEYWUGh2afQdxIVLUnIY zugUDc9yyd/6KeumIkRkBrM1dltkfRv1Oqty96+l0BKM78SuuhvSem/Dw6nwRPgwvk xwtJmDM3zBGVozWGeO78BGFHmprZD1Q6R6Q6pMGA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King , Guenter Roeck , Heikki Krogerus Subject: [PATCH 5.2 101/143] typec: tcpm: fix a typo in the comparison of pdo_max_voltage Date: Wed, 4 Sep 2019 19:54:04 +0200 Message-Id: <20190904175318.269640830@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175314.206239922@linuxfoundation.org> References: <20190904175314.206239922@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King commit a684d8fd87182090ee96e34519ecdf009cef093a upstream. There appears to be a typo in the comparison of pdo_max_voltage[i] with the previous value, currently it is checking against the array pdo_min_voltage rather than pdo_max_voltage. I believe this is a typo. Fix this. Addresses-Coverity: ("Copy-paste error") Fixes: 5007e1b5db73 ("typec: tcpm: Validate source and sink caps") Cc: stable Signed-off-by: Colin Ian King Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20190822135212.10195-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/tcpm/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -1446,7 +1446,7 @@ static enum pdo_err tcpm_caps_err(struct else if ((pdo_min_voltage(pdo[i]) == pdo_min_voltage(pdo[i - 1])) && (pdo_max_voltage(pdo[i]) == - pdo_min_voltage(pdo[i - 1]))) + pdo_max_voltage(pdo[i - 1]))) return PDO_ERR_DUPE_PDO; break; /*