diff options
author | Takashi Iwai <tiwai@suse.de> | 2023-02-16 16:18:54 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-02-16 16:18:54 +0300 |
commit | 5661706efa200252d0e9fea02421b0a5857808c3 (patch) | |
tree | b6943001feff0af67c206a850be9c536fe3990b4 /drivers/infiniband/hw/mana/qp.c | |
parent | 5791c7699ff1b8be24e1e3b2c08b180598d3ba28 (diff) | |
parent | 5beb5627a2481aade9aa630b7ebb7f99442321b6 (diff) | |
download | linux-5661706efa200252d0e9fea02421b0a5857808c3.tar.xz |
Merge branch 'topic/apple-gmux' into for-next
Pull vga_switcheroo fix for Macs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/infiniband/hw/mana/qp.c')
-rw-r--r-- | drivers/infiniband/hw/mana/qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mana/qp.c b/drivers/infiniband/hw/mana/qp.c index ea15ec77e321..54b61930a7fd 100644 --- a/drivers/infiniband/hw/mana/qp.c +++ b/drivers/infiniband/hw/mana/qp.c @@ -289,7 +289,7 @@ static int mana_ib_create_qp_raw(struct ib_qp *ibqp, struct ib_pd *ibpd, /* IB ports start with 1, MANA Ethernet ports start with 0 */ port = ucmd.port; - if (ucmd.port > mc->num_ports) + if (port < 1 || port > mc->num_ports) return -EINVAL; if (attr->cap.max_send_wr > MAX_SEND_BUFFERS_PER_QUEUE) { |