diff options
author | Gustavo A. R. Silva | 2018-04-30 15:23:06 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2018-04-30 18:05:44 +0200 |
commit | 252427037a360dcf4ee4b38e3b11c85e884b6646 (patch) | |
tree | 73ebe4bdc2993c64510770b1a64949fa5c88fa20 /drivers/usb/typec/tcpm.c | |
parent | Merge 4.17-rc3 into usb-next (diff) | |
download | kernel-qcow2-linux-252427037a360dcf4ee4b38e3b11c85e884b6646.tar.gz kernel-qcow2-linux-252427037a360dcf4ee4b38e3b11c85e884b6646.tar.xz kernel-qcow2-linux-252427037a360dcf4ee4b38e3b11c85e884b6646.zip |
typec: tcpm: Fix incorrect 'and' operator
Currently, logical and is being used instead of *bitwise* and.
Fix this by using a proper bitwise and operator.
Addresses-Coverity-ID: 1468455 ("Logical vs. bitwise operator")
Fixes: 64f7c494a3c0 ("typec: tcpm: Add support for sink PPS related messages")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/tcpm.c')
-rw-r--r-- | drivers/usb/typec/tcpm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 1ee259bc14a5..7ee417a525c3 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -1772,7 +1772,7 @@ static void tcpm_pd_ext_msg_request(struct tcpm_port *port, enum pd_ext_msg_type type = pd_header_type_le(msg->header); unsigned int data_size = pd_ext_header_data_size_le(msg->ext_msg.header); - if (!(msg->ext_msg.header && PD_EXT_HDR_CHUNKED)) { + if (!(msg->ext_msg.header & PD_EXT_HDR_CHUNKED)) { tcpm_log(port, "Unchunked extended messages unsupported"); return; } |