Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1313532yba; Tue, 2 Apr 2019 06:42:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGqNsPL6NKsPm9b6S/asB8ml9GERrclYkTukPjM7xECcZWhPhoU5UA6RylV3HLs5zhrxMb X-Received: by 2002:a63:4144:: with SMTP id o65mr66653079pga.241.1554212534009; Tue, 02 Apr 2019 06:42:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554212533; cv=none; d=google.com; s=arc-20160816; b=XBZu4GDUT5gVo3RxtIgzTEOKjqwZ08awg3Igc2pu8Gva9V5zR0nrPdJysYOMnNWHWG azX2YrkBzfn4QOiQYQ2wug+8G8H5wbpCVpVJVqh1gJ8MA94uqBMbW+BZ0F78XdOrLC5u E27kbgEqzysgIYXZu71dcBMk4ttl/7KN4jKrJGy0IMrppwrngxuuhwa816WU2+le1SNC hLN1yryt5pfS7KcESU4HggWNxZjV2n6ruzpf+5rroy7007zo/slpCnyATp/Bdq3ZGaAh 0XYjaOFdC1ptd80gSgsJFfmJI7Tx70xxwLVCXkjhsNadLjECdh7bfAM5JFfFTcHaQD0X XC9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=x8DYRj00gfl273YbMOUZHkmzWAB4ljbL75oMFHc/SQE=; b=gitL5kABm8+4+ddHbyFMHmBI5A2DzQUqyV0/MsLUtlXcBVnZ9KpwUrOKUcXi41b2kN cgxaXHuWlVR4lrNmYl17Zkmkb6IKBo4sDX/KcmSumbFhWWP3hMAU23ZuUIbfgpmu18Zn /UMYbulLMMT4VUuSoXOFAgj9S6XA+IUcI5tfDuA+te3eq0Hw65gsQkyO5tXFmLTSARAK Fvk9iZHa5ajahGZNQDQsfoAVU6x/zZJEofB20WS1YynHd6Y6vLnK2I5AeIsmCvWDnvuL YhniZJeuVtAMmTcE1xR6AJS9r5X6jpoRpAqpNHa2b2Cbzr9IUSvdB74LTd4J5nNroJEY LNuA== ARC-Authentication-Results: i=1; mx.google.com; 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 k193si11381595pfc.150.2019.04.02.06.41.58; Tue, 02 Apr 2019 06:42:13 -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; 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 S1731766AbfDBNks (ORCPT + 99 others); Tue, 2 Apr 2019 09:40:48 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:43812 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731553AbfDBNkO (ORCPT ); Tue, 2 Apr 2019 09:40:14 -0400 Received: from [167.98.27.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hBJe6-0002ob-Sk; Tue, 02 Apr 2019 14:40:11 +0100 Received: from ben by deadeye with local (Exim 4.92) (envelope-from ) id 1hBJdw-0004ux-S3; Tue, 02 Apr 2019 14:40:00 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Dan Carpenter" , "Jason Gunthorpe" Date: Tue, 02 Apr 2019 14:38:27 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 56/99] IB/qib: Fix an error code in qib_sdma_verbs_send() In-Reply-To: X-SA-Exim-Connect-IP: 167.98.27.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.65-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter commit 5050ae5fa3d54c8e83e1e447cc7e3591110a7f57 upstream. We accidentally return success on this error path. Fixes: f931551bafe1 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters") Signed-off-by: Dan Carpenter Signed-off-by: Jason Gunthorpe Signed-off-by: Ben Hutchings --- drivers/infiniband/hw/qib/qib_sdma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/infiniband/hw/qib/qib_sdma.c +++ b/drivers/infiniband/hw/qib/qib_sdma.c @@ -597,8 +597,10 @@ retry: dw = (len + 3) >> 2; addr = dma_map_single(&ppd->dd->pcidev->dev, sge->vaddr, dw << 2, DMA_TO_DEVICE); - if (dma_mapping_error(&ppd->dd->pcidev->dev, addr)) + if (dma_mapping_error(&ppd->dd->pcidev->dev, addr)) { + ret = -ENOMEM; goto unmap; + } sdmadesc[0] = 0; make_sdma_desc(ppd, sdmadesc, (u64) addr, dw, dwoffset); /* SDmaUseLargeBuf has to be set in every descriptor */