Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1527305pxb; Thu, 16 Sep 2021 09:15:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMR/71abOTegibXO8wBkzl8wzQuCekAY5ayZaHI0WUXlqJ4YWpnByPocfQf5mse5cQWUdK X-Received: by 2002:aa7:d7d5:: with SMTP id e21mr7525913eds.27.1631808959654; Thu, 16 Sep 2021 09:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631808959; cv=none; d=google.com; s=arc-20160816; b=akQUkhwp7mzd16ZIRepn7QuPsjFlxnhJ19YvnTTrsh0C5Y5RVGGJavcxld55DeXevk 7hRGD4BHgvb7aMleSlqabpb5yQad3SFCVN4431EM8P+DLg0fkPzyFCwk60KQHL6q5cbV whNHh3ZEoTYL2OBTXBq/L40QYBQo/1XheHRUIZqDTT804vQ0fXPNj9LRa9Nob/wmLLCF o0zJZsLIRsln/raE6MfwX68FPUPn7d+yrOyqiB4YDwUD06xHvU4YeZnfp8t2tdTMNrnw oZbZijCt8S8pt4ayDTz9rmDMtJs+wSNvb2p4LuaQV7EV5TRwembgpihHr0NRQ3m8ldgc c52Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=K+uoPq9CWERJTy9Q5dyyVQw7znGTAcNqMN9mFeWm/QU=; b=j9me31ufR24QijsHAe0DfgTjsrtD4eh4dwKGVomg+JuO6b96+E2ytnbFAQZ/hj9zCn yddZhhha307Gw5VrX/gFEmlxbq04wvorel6ZtfeWhUOd24BxVXNPyssAWmcI9o03SQMF 1NxjN393UNtnxOFrUWjJ8B78WinmA/XAhSKwRFbZlOQlmTYV2Dxt5g585AQPVAUxuxvA N0gDS0NskI8D5N2/sr7IC5tZbBMVVCJruA4u/UytaL4Zs+1Px7YZzVmx8V/r19NoOzoY LEgHgO+SAvQiHjVW4DkVNyi42HlsueMPIwDlFukQWTRTjHPrM0xJGuiegqqfKJ+yNLCc 0XWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ux+Zc7+C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d15si3894904edt.431.2021.09.16.09.15.35; Thu, 16 Sep 2021 09:15:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ux+Zc7+C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236689AbhIPQOC (ORCPT + 99 others); Thu, 16 Sep 2021 12:14:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:48650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235046AbhIPQIV (ORCPT ); Thu, 16 Sep 2021 12:08:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9A26B6124D; Thu, 16 Sep 2021 16:07:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808421; bh=zMcik/nzzmFt2mRxjeyxZnCqYxTirD4UdVU3pvmaC94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ux+Zc7+CigbbkNGdAz6Ety1C0wUELX+jvp1O1yetjVjqsTxHjqjIU78RRggpkEiRI gTtP2Nu22S1NQxIMMpCeWgtW3CSZm7adcSkQ5zXTqqFTx05wcV2PtqEjTMckE1hUhp 0/C/DpTXWcNW7gRUMmvLe+ldr6/DA+q9apRPwBLA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.10 085/306] scsi: smartpqi: Fix an error code in pqi_get_raid_map() Date: Thu, 16 Sep 2021 17:57:10 +0200 Message-Id: <20210916155756.949932288@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit d1f6581a6796c4e9fd8a4a24e8b77463d18f0df1 ] Return -EINVAL on failure instead of success. Link: https://lore.kernel.org/r/20210810084613.GB23810@kili Fixes: a91aaae0243b ("scsi: smartpqi: allow for larger raid maps") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/smartpqi/smartpqi_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 5083e5d2b467..de73ade70c24 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -1207,6 +1207,7 @@ static int pqi_get_raid_map(struct pqi_ctrl_info *ctrl_info, "Requested %d bytes, received %d bytes", raid_map_size, get_unaligned_le32(&raid_map->structure_size)); + rc = -EINVAL; goto error; } } -- 2.30.2