Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp2119867lkv; Thu, 20 May 2021 03:53:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfsmLdRJV1xdVs2K2IIQTDZO0U/kalt3lOvfH4b+NB1EW6Ide2C7LxAmk0pWNTG0noZHI8 X-Received: by 2002:a17:906:f20e:: with SMTP id gt14mr4053231ejb.368.1621508000589; Thu, 20 May 2021 03:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621508000; cv=none; d=google.com; s=arc-20160816; b=aQNRl7Oq6nyPUM9WcFMY/rrAmC8bxmL5XeJKaBYrFvPGKNozxBtQpWt6qIihx2s1My iFuaxm2PkdTsBj8MBPKQSzXf5rZ3Gb20ABN45acDV3tKBNhwLda1oq3N3VVICY62mtZT c92uTtUK6Itvw2EYQDsCfhl7yyorujgVR2+J4zUH1QaQaZ8xyISy0jusdXCRKcmrw8Oc eDCvYMiOxQp0SzXzDpEOXa04Lf3MB22dycLvMhQpvuvXzhtFxBybU81KX7AwlE0dV4d2 5v92wdzDtbEL8Pwtf/xUEN/109ReXAmtCgY5c46E/RnVzd5QFFv4Vm/pMXXpeaqiVSll kwoQ== 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=DMPieZVHl04EboSAo7Gfqv1SqmS6WdFX520pRSRoVg0=; b=dGBjgm6MtRZ34Q5xyFhVahSC4GD70o1MUD7AZ6KWoY3ZuoN2ENGxcRzPGrqWhSvLZQ kbLPWJOpv1qTMXELVRcTJeAws3SlD/IE5bZhSzm9Lc6ONiIQASAWEgFUSlHfLbbLk90/ inzAz21wOGWaBkXhHFDhMnk+m/qRvThivnJHyBZ8oT/lWx7Bd5h8KxDyLw0IT1gaWw/W 3uIwsS8GjDiOQbUVdXZRdrSnTg3MW3IQE8gabqEB6sCG0PojzvLw+Hu6618uJV0eeAZZ OpMn85yATMOSRF9JMlNwuWyF6moGplH0CsQ1QSr2FfXHTU5RjyHUqTsNZ6maxvy9vjWJ CXOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="l+D/30/L"; 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 mc14si2256016ejb.63.2021.05.20.03.52.56; Thu, 20 May 2021 03:53:20 -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="l+D/30/L"; 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 S237812AbhETKv2 (ORCPT + 99 others); Thu, 20 May 2021 06:51:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:39842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237825AbhETKfj (ORCPT ); Thu, 20 May 2021 06:35:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0980A61C62; Thu, 20 May 2021 09:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504433; bh=S4EPmOGhWiuMWGNKe7t0Ij091sAS3B5qwwBRaUlda2k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l+D/30/LwbdC98aUn925bCmBfcO0+7IKBl2joIbVmDnyZYsuq3I9sS32xlZ9fL21P oCmpe1YQZNJvdA2UCcBoAcCyAXStCzNkpo8xZA/vlrGQWbG49C1ws3zzTFsHfk8uN9 4AB6wJKpFnbSdBAYDxj7KQ36prtxdSLQhw8QksV0= 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 4.14 209/323] IB/hfi1: Fix error return code in parse_platform_config() Date: Thu, 20 May 2021 11:21:41 +0200 Message-Id: <20210520092127.290936006@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@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 5aea8f47e670..c54359376cda 100644 --- a/drivers/infiniband/hw/hfi1/firmware.c +++ b/drivers/infiniband/hw/hfi1/firmware.c @@ -1885,6 +1885,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