Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4382437pxt; Wed, 11 Aug 2021 04:57:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcFNymQhgb5QMPYIdRkCOHv8w4BUBMYxkucryGVxUJbQzgB565iqBTkjS6DkXZaOC3RHc+ X-Received: by 2002:a05:6638:1495:: with SMTP id j21mr793055jak.117.1628683021894; Wed, 11 Aug 2021 04:57:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628683021; cv=none; d=google.com; s=arc-20160816; b=TF4Ml7lryw1hwm5+0MIKFK2tGiPy2iYUoSP3/5qCa2lT+N+cGmuySMjlIrTZo4OZ2z zl8LNUZTaH80jP28RSoGlYeUqiJlYAKYgI9yC0U9Jc33ihPRZXldIQUe+Z6A4wjZ+yPE gpRhoIbhCO1XYgWNDQRUkAy9MtqU46pWEhrIrn5NSW0OrF9c+i0i9NxSn1xDmtNMiVGD 2DeJcDNq01IGZeUQ2kuf+9wPmMRF66Ycb3g05ruY/iDPYHzF692lIoiGAhaLIQHcZOyP vbOmvN22OKC1MOpcw/0XL83Ejx1kp2xqqGsyYrtzCH+1bjgREqY1SfVyqkZH7juoGm3t E9dA== 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=fmx0QQqxJfNnvFsn2KeieaPwwlV7zjBeX0GV6fuzUt0=; b=VJHfDjpIELKNK+XMzkSYAsocwu1K45Jyzep9xpJaYsp14kfL2zUh6e3CIAoXuJRT7I Nb8hocsS0URpHsutWIainV8E1Xkls/oifrtQyHuhEoISydtNsAJeC7Iy/QvIwsPQ740x CSRQ3N2UdimBN532/C81+okR/rUEkDRNdgg9/QSO0bA7myjr+91Dgfh+9DDAYyQsmA6Y 15+WtJQYjc8j9x4GiblxshSH3rvCsenGsxINUs8kLdAiMOcr0dqQXTYwbrzVCK/l2JRH Iwb5gyxhqUfhpTbgjRd+WvMG3+9I/VEOVrwboRleZgZh1upg74X2LLw+m+zQP0SkI57/ Lxtg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m2si2867303ili.39.2021.08.11.04.56.51; Wed, 11 Aug 2021 04:57:01 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232160AbhHKLzZ (ORCPT + 99 others); Wed, 11 Aug 2021 07:55:25 -0400 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:44179 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbhHKLzZ (ORCPT ); Wed, 11 Aug 2021 07:55:25 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.11]) by rmmx-syy-dmz-app01-12001 (RichMail) with SMTP id 2ee16113ba8532d-64212; Wed, 11 Aug 2021 19:54:47 +0800 (CST) X-RM-TRANSID: 2ee16113ba8532d-64212 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[223.112.105.130]) by rmsmtp-syy-appsvr06-12006 (RichMail) with SMTP id 2ee66113ba81a7c-3dfcf; Wed, 11 Aug 2021 19:54:47 +0800 (CST) X-RM-TRANSID: 2ee66113ba81a7c-3dfcf From: Tang Bin To: broonie@kernel.org, olivier.moysan@foss.st.com, arnaud.pouliquen@foss.st.com, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com Cc: linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tang Bin , Zhang Shengju Subject: [PATCH] ASoC: stm32: spdifrx: Delete unnecessary check in the probe function Date: Wed, 11 Aug 2021 19:55:23 +0800 Message-Id: <20210811115523.17232-1-tangbin@cmss.chinamobile.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function stm32_spdifrx_parse_of() is only called by the function stm32_spdifrx_probe(), and the probe function is only called with an openfirmware platform device. Therefore there is no need to check the device_node in probe function. Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin --- sound/soc/stm/stm32_spdifrx.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sound/soc/stm/stm32_spdifrx.c b/sound/soc/stm/stm32_spdifrx.c index 48145f553..8fe822903 100644 --- a/sound/soc/stm/stm32_spdifrx.c +++ b/sound/soc/stm/stm32_spdifrx.c @@ -908,13 +908,9 @@ static const struct of_device_id stm32_spdifrx_ids[] = { static int stm32_spdifrx_parse_of(struct platform_device *pdev, struct stm32_spdifrx_data *spdifrx) { - struct device_node *np = pdev->dev.of_node; const struct of_device_id *of_id; struct resource *res; - if (!np) - return -ENODEV; - of_id = of_match_device(stm32_spdifrx_ids, &pdev->dev); if (of_id) spdifrx->regmap_conf = -- 2.20.1.windows.1