Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4628386pxj; Wed, 12 May 2021 09:34:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTeNUAA4cs4jseaYoJsptC4PCclbXOmGs3t/Y2FszK28QmIMzyzVsLp7UfSiVk7LwOSHmq X-Received: by 2002:aa7:cdd8:: with SMTP id h24mr44160493edw.276.1620837242723; Wed, 12 May 2021 09:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620837242; cv=none; d=google.com; s=arc-20160816; b=SwMYDtMocB/QgAGSxlKKVf4BN7/g+HsTbdMArJASp8nZ84DcbnxHbA9Pwc4nqJmiRV Qrxb1pk6TtqKFjW3+VzKfQtXSkhBzHaNbhQhtx+4Z6OyGZbcVwj8fNTO3xLYHSqo2Hty Ik9hBdw8LzFYVjWNWP75SDgElBGpH19TpPZF6tdTRUQ3RaJz6Y/KsqHe59BGtQZuW4aE KBQJEBG71PgimqMf2zPxTjP0w0pZ8ocKp3U63TB+jt24CNTvaFTOD6jrXck010vjUU1a vRwQ2xZd9/M9wn8n6cdmUSsFZsGxbiEebxzOw9rE8V79rbKXQpFINIqNsNTO0hUYWKet omGA== 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=DyoZjoZuZulcWWC4dzWtCd/ozmKITHeiRTY8qjm5J3Y=; b=x720uQZeDE/MqplX/GmFuB2Z8I4AL9RFb8RuuNygirCS23T4uMYKQpD/FexcGmqTGf nmLKVWTl7qS4WsBXEKWKjIopG7ZWa5nOhyn/UB53Nq+7RVLrU5N5sWzpoWbgsWAVtdos S5w+ovK6y37TyuNhxebiDAQnXVHz5G6aKTR69LFqve/eP9+7EfdOrq0xSg7vMy8zb83o EGFZjNbvzYJ7a7QtIDFc9shcsTxyU32+d00JS6tkNfdU12GQS4LAdOAmK5xX0uOyTYkv qahwMy2+dC5ebNCEmmT9VQZ2vP6kGiTDWKMTCrUr3BAzO56xcZ879mJIxrrEilmo8/ya JdvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RW9LrDm9; 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 e1si395537ejx.431.2021.05.12.09.33.38; Wed, 12 May 2021 09:34:02 -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=RW9LrDm9; 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 S241306AbhELQ1A (ORCPT + 99 others); Wed, 12 May 2021 12:27:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:55348 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236414AbhELPhx (ORCPT ); Wed, 12 May 2021 11:37:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C88C961C5F; Wed, 12 May 2021 15:19:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832783; bh=8OXsMbHI/ZYKcUDdic0MdkI5wGcbxa5+XY0URUkODhc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RW9LrDm9p+vHNhERufoo2pd8a0WHUYwgUSPn0kTqjLTTQPomVgWWYtY5WrnK3VGzk YKFiBDckLjYovbUynO8/grps3i7vEJVVLPOZmEdg6xWqbcIIcgAlBApGYOnLwp55M3 zci+c1AspSVVWQUIgcEY9Ts7pqahk4X2ZNRPfoNY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Wang Wensheng , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.10 422/530] IB/hfi1: Fix error return code in parse_platform_config() Date: Wed, 12 May 2021 16:48:52 +0200 Message-Id: <20210512144833.644251297@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@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: Wang Wensheng [ Upstream commit 4c7d9c69adadfc31892c7e8e134deb3546552106 ] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 7724105686e7 ("IB/hfi1: add driver files") Link: https://lore.kernel.org/r/20210408113140.103032-1-wangwensheng4@huawei.com Reported-by: Hulk Robot Signed-off-by: Wang Wensheng Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/hfi1/firmware.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/hfi1/firmware.c b/drivers/infiniband/hw/hfi1/firmware.c index 0e83d4b61e46..2cf102b5abd4 100644 --- a/drivers/infiniband/hw/hfi1/firmware.c +++ b/drivers/infiniband/hw/hfi1/firmware.c @@ -1916,6 +1916,7 @@ int parse_platform_config(struct hfi1_devdata *dd) dd_dev_err(dd, "%s: Failed CRC check at offset %ld\n", __func__, (ptr - (u32 *)dd->platform_config.data)); + ret = -EINVAL; goto bail; } /* Jump the CRC DWORD */ -- 2.30.2