From patchwork Thu Jul 9 09:55:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Bader X-Patchwork-Id: 1325864 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B2WlC0tSrz9sSn; Thu, 9 Jul 2020 19:55:50 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1jtTHL-00039M-0N; Thu, 09 Jul 2020 09:55:43 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jtTHJ-00039A-PK for kernel-team@lists.ubuntu.com; Thu, 09 Jul 2020 09:55:41 +0000 Received: from 1.general.smb.uk.vpn ([10.172.193.28] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jtTHJ-0005wh-Ex for kernel-team@lists.ubuntu.com; Thu, 09 Jul 2020 09:55:41 +0000 From: Stefan Bader To: kernel-team@lists.ubuntu.com Subject: [PATCH SRU Bionic] UBUNTU: SAUCE: mlxsw: Add missmerged ERR_PTR hunk Date: Thu, 9 Jul 2020 11:55:41 +0200 Message-Id: <20200709095541.12387-1-stefan.bader@canonical.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1877461 While backporting this stable patch to Ubuntu 18.04/Bionic, a hunk went missing which causes mlxsw_afa_block_create() to return NULL still in some cases. Fixes: 2b8b72daf074 ("mlxsw: Fix some IS_ERR() vs NULL bugs") Reported-by: Vegard Nossum Signed-off-by: Stefan Bader Acked-by: Kleber Sacilotto de Souza Acked-by: Kamal Mostafa --- drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c index a29ae4cd3187..7544fbcc3283 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c @@ -319,7 +319,7 @@ struct mlxsw_afa_block *mlxsw_afa_block_create(struct mlxsw_afa *mlxsw_afa) block = kzalloc(sizeof(*block), GFP_KERNEL); if (!block) - return NULL; + return ERR_PTR(-ENOMEM); INIT_LIST_HEAD(&block->fwd_entry_ref_list); block->afa = mlxsw_afa;