Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2743930pxj; Mon, 31 May 2021 09:38:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzM8DQlt/P/Psgiw2nzjiYcjpGNqJJQCTZ6MSDJGvyj+r3zvedKwa5cOpgKQNrDkv75V3cp X-Received: by 2002:a17:906:c833:: with SMTP id dd19mr11766558ejb.255.1622479082474; Mon, 31 May 2021 09:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622479082; cv=none; d=google.com; s=arc-20160816; b=X1UfZ4neU5PkU6MzgvgpjqoVaAR+XW7F9PlTxcg2Io4kk7Uo9XZxbB520wEfxq+9Mz njEx/uo7u4jUVHK0pSjHzgIzXUIkAG3w13SV/1YWmgDlbhGcDOQA3BSlSbPiW5ieDHCT bQzRFDGyfEAlsQyKQul3jp1YESD+2lBdP36XRq20+f/Oqyd9XLsncBK7x+ajTvzvP7UD flS9ZLJbYR5Q88f5RfNJ0l1ttx30UpSHl7kh2+32wqa50ksN6SnOjrJODMRniC41Je9H sV70EscluuFyUUlnOBXmVuvU9LCXhHGrdR4UYjDTT45IvxCHYwTKTssAY9F5A7LNHdNz LtsA== 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=pB20YjPtT+H/lcil9dxtKp39RLUZtYL8Nx9k6/Gf4f8=; b=yebqrGxtJwfRru1p6K3UBDMqZBlYs5scX0UapKDf9ceip2rEIoERDsWZWFiFzetSgT QmM+YBC+4V5793sTDOv++7t+7/7RvB1ZNzffwBMec10T0aZVH9k9bxipWSeUlFmHGYzI 5ezKaav5+pt7SfPTS1pprAiLQnicRQCq3p0C2czWJhXAfMDGv5i+3HmyWg5KXmZRTv0a klCMPp6IyIHt6d7gkSyInkj9KYTKd+j9/Lou3UwE2LsRIVL35RvzPmT8vVV05WyMEIxh 1WPYYJJ+PcxICcuv9w9b+08Fb92JFsqHG7MzA9qmvQZ5kOkQSIn+HDZGxiTyCIXTh3FD kNmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hEaCDU0t; 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 h15si15646930ejq.124.2021.05.31.09.37.37; Mon, 31 May 2021 09:38: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=hEaCDU0t; 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 S233479AbhEaQgP (ORCPT + 99 others); Mon, 31 May 2021 12:36:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:40320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233316AbhEaOrK (ORCPT ); Mon, 31 May 2021 10:47:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1B63961438; Mon, 31 May 2021 13:55:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622469360; bh=xDh8vqmsD0PqY7lkpUvW7q/+AmZ23MBZFO5QElc9QaU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hEaCDU0tuTr+sk7GP57CQEtUKQmTwpeAqv2WGd+tm4mODqh86lonPNrE4J3Nl2VEP JOid0caZP+RXi2PgZSR3F/6be404UrnJhkyD+doyFvxEs6QbP2tBfxZ51DnsFVFlvJ CZi4RFcGd7pHrciSSJWv28esm62FFyMC/10e4OVE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kangjie Lu , "David S. Miller" , Dominik Brodowski , Sasha Levin Subject: [PATCH 5.12 167/296] Revert "net: fujitsu: fix a potential NULL pointer dereference" Date: Mon, 31 May 2021 15:13:42 +0200 Message-Id: <20210531130709.484133072@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130703.762129381@linuxfoundation.org> References: <20210531130703.762129381@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: Greg Kroah-Hartman [ Upstream commit 5f94eaa4ee23e80841fa359a372f84cfe25daee1 ] This reverts commit 9f4d6358e11bbc7b839f9419636188e4151fb6e4. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original change does not change any behavior as the caller of this function onlyu checks for "== -1" as an error condition so this error is not handled properly. Remove this change and it will be fixed up properly in a later commit. Cc: Kangjie Lu Cc: David S. Miller Reviewed-by: Dominik Brodowski Link: https://lore.kernel.org/r/20210503115736.2104747-15-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/net/ethernet/fujitsu/fmvj18x_cs.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/ethernet/fujitsu/fmvj18x_cs.c b/drivers/net/ethernet/fujitsu/fmvj18x_cs.c index a7b7a4aace79..dc90c61fc827 100644 --- a/drivers/net/ethernet/fujitsu/fmvj18x_cs.c +++ b/drivers/net/ethernet/fujitsu/fmvj18x_cs.c @@ -547,11 +547,6 @@ static int fmvj18x_get_hwinfo(struct pcmcia_device *link, u_char *node_id) return -1; base = ioremap(link->resource[2]->start, resource_size(link->resource[2])); - if (!base) { - pcmcia_release_window(link, link->resource[2]); - return -ENOMEM; - } - pcmcia_map_mem_page(link, link->resource[2], 0); /* -- 2.30.2