Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2220553pxb; Wed, 30 Mar 2022 19:45:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9WjjOhDM3p9sdqveuj31EHm/o3paLyD91yH9FaoRSeeXjUvxikzF2k3bQIuwA3cvu3bLb X-Received: by 2002:a05:6a00:4096:b0:4fa:8f23:e972 with SMTP id bw22-20020a056a00409600b004fa8f23e972mr3044136pfb.26.1648694754440; Wed, 30 Mar 2022 19:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648694754; cv=none; d=google.com; s=arc-20160816; b=b4MbuebytkjS2Xxkdl3CnpSJc8wmomRiPn14qUbQve64Xmk/FBR3uV8aFT0Idp3Opq /zw+mtKS4IelNUguxPtC1QWk/FGaMB0sshdB4beRFo1/Abh4QqP4A2PoH4DVqVb6GHtB Lb31VPkt4I7+TvENaTRxv177EYFGwVsTQ31Zuq8K7XvIVwneXSieltpUlcDRoSg8Vctu PcBB8RbeIAVAAtoxhbYtJKtDoKBJMx5P8rqLz9hY99EUZcrl93cHw/wj0YXUY3Q9gtxn HxvGNeVxnW53kXSV7Sd8FzX8CFgqE7DYaq7SxxXnfIE3xBekVHeQtQIfv3DghLl6Fjmn 83LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VHhNwfc6D4gLfA8Pi0IcQktZZ4hAoWSUUSdmZYtbv7U=; b=osQLS21FfU8V0OcBWBlAt+svpsNKyYdhN1bzdEVAqet8UUJtBn5nS680AfrTTlwTkm /v32UxPd5kntSAU6I2RU1pS+m+tq4989vKnMnzrEw8HhI8TIXYjsf59pCWMI3ofXCt3i 3Gt2H4DeKKLHEvRJehVMObnuV5QG2HIa3ze07o8Bu66Gz53Qe5zXP4HI0TtNgYMFPmK+ 8hzoVlqBNmcvw04kQhjvwfecQj0VthTd0Ldeld5oabfRSOwRKsB5NQ4uk2l2MV9R8/bv S0UULuQRw/K9KGUdJ4kLSG/i+AIx2zAf7f0lNVFQdre0iOazCLrj1pMwSucgeuThr1+Z oUVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=XBmKv2nW; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l17-20020a170902f69100b00153b2d1643dsi24704345plg.69.2022.03.30.19.45.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 19:45:54 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=XBmKv2nW; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6C44F8BF46; Wed, 30 Mar 2022 19:35:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245748AbiC3LFg (ORCPT + 99 others); Wed, 30 Mar 2022 07:05:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234487AbiC3LFf (ORCPT ); Wed, 30 Mar 2022 07:05:35 -0400 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC6D16151 for ; Wed, 30 Mar 2022 04:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=metrotek.ru; s=mail; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=BMy5MpLHZ2eMrjRM9df3zSOhU3qkqVEIGDXRzBANghc=; b=XBmKv2nW3trthDQKLf382mrokcjes4sje8ugGFHNjU4gZ1LMrIF4weACqqnW4uzK03HdU8uyMjor5 XOofRYLj0o1aXlqJKUCYl/rVjEyyVHJzslsXD/zha9wdCjveH+MfiMzRcNySySYJzw6srr/xawqZFV wPlx9qXuc//wrIot7RApk45blI+S71BdJsA0LlDIVL4a/uGSAVyroer+qRrsUYktdDj5G9mmif0v/4 iblF7KDuSv4oNUmcOr9tqcHjZn25UH3fhDQ3hOg5gfkc9nVRjz+EAUY088yXfbPdxGOuz3Xbf0ys7F /5Zb0lkxbHgwyVKmKHs084js04bij8A== X-Kerio-Anti-Spam: Build: [Engines: 2.16.2.1410, Stamp: 3], Multi: [Enabled, t: (0.000008,0.005704)], BW: [Enabled, t: (0.000017,0.000001)], RTDA: [Enabled, t: (0.083100), Hit: No, Details: v2.31.0; Id: 15.52k0as.1fvd7s32n.dt73; mclb], total: 0(700) X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLACK autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: X-Footer: bWV0cm90ZWsucnU= Received: from h-e2.ddg ([85.143.252.66]) (authenticated user i.bornyakov@metrotek.ru) by mail.pr-group.ru with ESMTPSA (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)); Wed, 30 Mar 2022 14:02:45 +0300 Date: Wed, 30 Mar 2022 14:02:29 +0300 From: Ivan Bornyakov To: Haowen Bai Cc: Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] bus: imx-weim: fix pdev is NULL but dereferenced Message-ID: <20220330110229.xczp74pd6o4xvfws@h-e2.ddg> References: <1648635500-12631-1-git-send-email-baihaowen@meizu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1648635500-12631-1-git-send-email-baihaowen@meizu.com> 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 Hi! On Wed, Mar 30, 2022 at 06:18:20PM +0800, Haowen Bai wrote: > pdev is NULL,so we can't dereference it dev_err(&pdev->dev > > Fixes: e6cb540 ("bus: imx-weim: add DT overlay support for WEIM bus") > > Signed-off-by: Haowen Bai > --- > drivers/bus/imx-weim.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c > index 60fbd42..31a2213 100644 > --- a/drivers/bus/imx-weim.c > +++ b/drivers/bus/imx-weim.c > @@ -352,9 +352,8 @@ static int of_weim_notify(struct notifier_block *nb, unsigned long action, > > pdev = of_find_device_by_node(rd->dn); > if (!pdev) { > - dev_err(&pdev->dev, > - "Could not find platform device for '%pOF'\n", > - rd->dn); > + pr_err("%s: Could not find platform device for '%pOF'\n", > + __func__, rd->dn); > > ret = notifier_from_errno(-EINVAL); > } else { > -- > 2.7.4 > This is a solid bug, but there is a fix already. https://lore.kernel.org/all/20220223035146.412499-1-wanjiabing@vivo.com/ For some reason it was not applied yet.