Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2810925rwb; Mon, 19 Sep 2022 10:15:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4PVi1D9iqF+ip8i6nDBxsiA0o9duooYC+fMdizveP9zdjkijZ7jx0hRHiKKB7IzE8jDkxx X-Received: by 2002:a17:907:8a0b:b0:77a:be0e:f19c with SMTP id sc11-20020a1709078a0b00b0077abe0ef19cmr13998809ejc.397.1663607729161; Mon, 19 Sep 2022 10:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663607729; cv=none; d=google.com; s=arc-20160816; b=tjh0eVqZmI0cFo3i7G+PQjop+HbbUACvzjg0/y+onJUmkArO5pIihQvfbdRZP16P5i UFG7eZ58M8yOeNimECBIBrnjUzGZW1HsCs2P9lerR48k72s34dGjzYijjBMQ+5HQT2Ro zytqxHYo+v5hvzk2o+BPN5Vkidn4L7VxWooQurBCB6q5wPhoC0owVQfFe5rY60rl1phV X6VLPPr67k/LKH9AyiAsMopJQC8HkLm67jALUQv3GOf65yTwxDMvr2bZCOG/GoUM08aC EaY3yyCpS/699sDE2iiiMN5GcZxtYYAZc8geDi/ScO2c1Bil1X4EJC0ngi9CRh1J+Oza Mtdg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6s1GEq/NI5LtLtoKNvI8GY+IRQMhDfNQ2NfkC4suIrE=; b=yvGjoD4a1D/4QJ2wQOHsTdt+HEzquedM44tnIO8cAbrC10gnMO8UlzplvSbKd5VN1A wiKr8eqvLWEeef4U8C9PBGSZNTV4M52wstbNtthFRxOAjh1qJ0FAUsXRj072xWibe/wV xRRygFRKekvyfCEgoumqDQVbXj/dIjQWZ2/tdMpp3B4+Fcbj7C5QPYrSQsPvP/TGWlBL naDeXqGfn/2quVY2X+A/IAT/kMBjR/jpvFrSzqsifyZrhqeeSloL9b/7bSGzA22wQlsB Y045RlzNWNPMZwszy/YuYsbpquLh3MPeyJV0YN3MCSyDemXHszhW+UXWkqp+yNoZIPFL CIaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=p2LLNDPs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs16-20020a1709072d1000b0077c393f05e8si21281541ejc.750.2022.09.19.10.15.03; Mon, 19 Sep 2022 10:15:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=p2LLNDPs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229519AbiISQQ0 (ORCPT + 99 others); Mon, 19 Sep 2022 12:16:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbiISQQK (ORCPT ); Mon, 19 Sep 2022 12:16:10 -0400 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00D5B31348 for ; Mon, 19 Sep 2022 09:16:07 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 1C5651BF209; Mon, 19 Sep 2022 16:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1663604166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6s1GEq/NI5LtLtoKNvI8GY+IRQMhDfNQ2NfkC4suIrE=; b=p2LLNDPsZ2c8y/bc3+rdRKTyzUDu0PaZzdiZWvYDZW4rBfzS1Aee4IqRVGDxLnU2t7j190 TfKzVyb+2bBNxxiEgjQ3zGBh2z0jSq8Xm7RhEP3hLbK4BjLUDcjbC/62BBKVI/CuV1C5PZ 6BDJRZRNFbkQwvbG/TBAo+gVPyGMrUHqeZgz7xloU+CDPvx841cFmxKIntMHB4CO2TWJWz PKsNj86q74xG2Kpb9Y4iz2jf2tq2wcHWekSF4xZXPVd4YSKoRkp2SctrqLjzqSbQEqN19a PG5XF0JJtGP1J72J0n2QecrVcryzOIQCa16WMzP7nDvf1ItdKivHcGe7Q/0xZA== From: Miquel Raynal To: Zeng Jingxiang , miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Zeng Jingxiang Subject: Re: [PATCH] mtd: physmap-core: Fix NULL pointer dereferencing in of_select_probe_type() Date: Mon, 19 Sep 2022 18:16:04 +0200 Message-Id: <20220919161604.226569-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220727060302.1560325-1-zengjx95@gmail.com> References: MIME-Version: 1.0 X-linux-mtd-patch-notification: thanks X-linux-mtd-patch-commit: b'8b740c08eb8202817562c358e8d867db0f7d6565' Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2022-07-27 at 06:03:02 UTC, Zeng Jingxiang wrote: > From: Zeng Jingxiang > > Coverity complains of a possible NULL dereference: > > in of_select_probe_type(): > 1. returned_null: of_match_device() returns NULL. > 2. var_assigned: match = NULL return value from of_match_device() > 309 match = of_match_device(of_flash_match, &dev->dev); > > 3.dereference: Dereferencing the NULL pointer match. > 310 probe_type = match->data; > > Signed-off-by: Zeng Jingxiang Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks. Miquel