Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp480667pxb; Tue, 15 Feb 2022 19:16:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFKeHsxT2DL9eri1YJnV6kxCQtGHKtMhuWb++XZBQ6/BQ3g2rqQzyoCfRphAGMqpdzMx5f X-Received: by 2002:a05:6a00:2484:b0:4df:c6b0:2ffb with SMTP id c4-20020a056a00248400b004dfc6b02ffbmr608889pfv.49.1644981411744; Tue, 15 Feb 2022 19:16:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644981411; cv=none; d=google.com; s=arc-20160816; b=FAnBEArAuMXuUWN+4G+G6FTSds2n7rV12dQxJlB4h6/xOnR9Ap1YfS3EPlTtsYabey NS3ZBsn5zflczjKYh90dOeTI/5a1NtBFr0iRURK9b0ST9m6fw288v6qw8516M04NCR3T DEv1UsghWpDi80PLB8uOltsBDC2ICWuQuF7ZCYwHncFhidXQqP67nPRJCTwSVbRxrtFZ 84eIbEHUU0+AtliyZehln1WQjhNq6ABHd23U/f1L/BdTXpZbdfCdrFCaBFooB5s3gQBV qMxDbw8O/k6PCwPJoBSW6CbVd6KNLSy4Q9tbXtPN5ctGai2JYfCpAQX3PJXuIUviEIlf dNlw== 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 :message-id:date:subject:cc:to:from; bh=R/KVMO/o/hyxaJLo367qPe6NuoBnO6hlV2w4kVR0oWo=; b=OjSJdBkJha3mvqrvjcFCbg4ag8lTUBYOUzgpr15DVTBZyu88bVfsLlt4w2OkOUerOD kiJ+5CeVHcPTFKfXxmvUAzHX908RzEPRT5zCV/ZcXibfn23LRr+P5LiwzIrwVHd3rUt7 /6BvUPPFyuTGZPhEnfGjzf0AFtCfEekHaiooSLMXebOjsWFFq1kXcmqO7YjxQLQYPMyV bB3+wRT59TUaBz3Af9rJMPq+bBaZNzGaYY5VtDW9OFK64s1hUkNo9sLrXUeyfz2T5Kdg mEMsAeDJK91ycxg+QorM3IK9v14//KI2BaOMwdW6tOa4OH00f6Z+fn9OUbFhArAPAwfI lrag== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k3si19498636plk.582.2022.02.15.19.16.35; Tue, 15 Feb 2022 19:16:51 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243535AbiBPCLf (ORCPT + 99 others); Tue, 15 Feb 2022 21:11:35 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:50158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229693AbiBPCLd (ORCPT ); Tue, 15 Feb 2022 21:11:33 -0500 Received: from out30-54.freemail.mail.aliyun.com (out30-54.freemail.mail.aliyun.com [115.124.30.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04620FBA71 for ; Tue, 15 Feb 2022 18:11:21 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0V4b3tCJ_1644977477; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0V4b3tCJ_1644977477) by smtp.aliyun-inc.com(127.0.0.1); Wed, 16 Feb 2022 10:11:18 +0800 From: Yang Li To: perex@perex.cz Cc: tiwai@suse.com, lgirdwood@gmail.com, broonie@kernel.org, quic_srivasam@quicinc.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] ASoC: codec: wcd938x: Fix NULL but dereferenced coccicheck error Date: Wed, 16 Feb 2022 10:11:16 +0800 Message-Id: <20220216021116.94384-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 Eliminate the following coccicheck warning: ./sound/soc/codecs/wcd938x.c:4210:21-24: ERROR: component is NULL but dereferenced. Reported-by: Abaci Robot Fixes: 013cc2aea0f6 ("ASoC: codec: wcd938x: Add switch control for selecting CTIA/OMTP Headset") Signed-off-by: Yang Li --- sound/soc/codecs/wcd938x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index 2663fe0bf64f..c46c4bfd84f2 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -4207,7 +4207,7 @@ static bool wcd938x_swap_gnd_mic(struct snd_soc_component *component, bool activ struct wcd938x_priv *wcd938x; if (!component) { - dev_err(component->dev, "%s component is NULL\n", __func__); + pr_err("The snd_soc_component is NULL\n"); return false; } -- 2.20.1.7.g153144c