Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp611369pxm; Wed, 23 Feb 2022 07:17:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwE9JyLfa2djN+pYMi/1IVC3YUXcCUvPLaaYhK/f1oqfx557E0jFfYyVlRnmBYPiJ4M3OBz X-Received: by 2002:aa7:d2c8:0:b0:410:e248:48eb with SMTP id k8-20020aa7d2c8000000b00410e24848ebmr31630150edr.325.1645629451849; Wed, 23 Feb 2022 07:17:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645629451; cv=none; d=google.com; s=arc-20160816; b=AVRSNzpAleUBnAL385p648Qf9wnbvhA4h0f9RA/x0EA/Vqt9ufc3ZauXl4nimO/hJb TG70i6h5rnRUkfmpaM1Sdt2Moj/KhOXIkxy9vvs4aKyb1nyVTDNulKg4ZFxHOYLH4d46 W+7TN6fYxEJaD5qszEHhJoYBNZQE1onF99r3IRQPAAeVnbdCdmFjlYWihNUMRqYskPMS hrKr1cg98v5wDol2+wIBIevCg8G5xNus+Gd8/DxsZ67+kKsMmFfuUl1FEsbwR4GJwavW EPf/L1W2vPQ2ihM/n3ER5A15c/IpP8nUZCdu95ZcZ4CnLdXnGd36FZHyDfSPJhgnit3s uKUg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MAq4URNMkNeKY1G5k3KafvlTUZti6ksA7dOZBMlz+nY=; b=PZP2qFRf3DGzBouBcBNVfWZ0R3zx0p6fV+D/kPmZRi+0q8Ts8sC8aUDJmHcYzT6F2U BctN3tYp5F6gIoglP1Bj6CEJQQdmp1JF0qD5JsN0GvbghYkhk8i3wIbU3pvSlL33Zjal Zv6dh+F6gQgALrw5QFHSxMHz+nFA0x7bZCI9+7+z05ehDTi+71eXAQnvvW63l9SFrqkS K7qwoBYfFHnR/xCedMG9vq2Ofh5BBPY6yQIGveNru1iqvtWTSmQt0JDY3xLV57ffwvOz 4h/HLgCGzgFxf0zZlqbDECmuog6Nyq/AiNuv+mOG2NYdbG0DfkqMqROk0QfyYOY/Ayiu WzoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=RyYb6zh4; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id os21si8738666ejb.48.2022.02.23.07.17.05; Wed, 23 Feb 2022 07:17:31 -0800 (PST) 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=fail header.i=@metrotek.ru header.s=mail header.b=RyYb6zh4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237526AbiBWHRO (ORCPT + 99 others); Wed, 23 Feb 2022 02:17:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235535AbiBWHRM (ORCPT ); Wed, 23 Feb 2022 02:17:12 -0500 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6D1C46B37 for ; Tue, 22 Feb 2022 23:16:41 -0800 (PST) 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:in-reply-to: references; bh=icH7A7Mcs++qD6v5oQ8tnDH0OAovFNxVtZ/iN3vwo5A=; b=RyYb6zh4/8jx3DHYHETaBRijqqqVcjILRnS4ag9VD+wVMIvz+CTOz4NdD/Njos+fPsJ8hq3EzxqNs crwrKNV12uxtbDVyxO+WocVy9pBuAfOs8H0BwSfIw4Y46VbqLGxDAFMENpe9/BIY5di/KeFg1L5BQr HOXheRaxpdsTmXY0gWWOk+Ncxq4zFpWwTBKtSPKnHlX7Xgk5u5LuCLAbNUlf1+4g3Zcbfd/1nwUAoO 0IJl5tBsDp6XLTh8qDQmjEiFY/20eZeMRyn4GmcoHCtJSXID2HCOf2t7oEz/dRIltfSXOAEwf5WBNn D9osPXpy/mC7LHXDhsQrPaTsLduwCTw== X-Kerio-Anti-Spam: Build: [Engines: 2.16.2.1410, Stamp: 3], Multi: [Enabled, t: (0.000008,0.005258)], BW: [Enabled, t: (0.000022,0.000001)], RTDA: [Enabled, t: (0.065102), Hit: No, Details: v2.25.0; Id: 15.52kbl7.1fsin0mpv.nh05; mclb], total: 0(700) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Level: X-Footer: bWV0cm90ZWsucnU= Received: from x260 ([178.70.66.234]) (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, 23 Feb 2022 10:16:33 +0300 Date: Wed, 23 Feb 2022 09:58:15 +0300 From: Ivan Bornyakov To: Wan Jiabing Cc: Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, jiabing.wan@qq.com Subject: Re: [PATCH] bus: imx-weim: fix NULL but dereferenced coccicheck error Message-ID: <20220223065815.i7qbyz2gtkgjzcwv@x260> References: <20220223035146.412499-1-wanjiabing@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220223035146.412499-1-wanjiabing@vivo.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 On Wed, Feb 23, 2022 at 11:51:45AM +0800, Wan Jiabing wrote: > Fix following coccicheck warning: > ./drivers/bus/imx-weim.c:355:18-21: ERROR: pdev is NULL but dereferenced. > > Signed-off-by: Wan Jiabing > --- > drivers/bus/imx-weim.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c > index 60fbd42041dd..2ea0a51f79f6 100644 > --- a/drivers/bus/imx-weim.c > +++ b/drivers/bus/imx-weim.c > @@ -352,8 +352,7 @@ 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", > + pr_err("Could not find platform device for '%pOF'\n", > rd->dn); > > ret = notifier_from_errno(-EINVAL); > -- > 2.35.1 > Acked-by: Ivan Bornyakov