Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp11532360pxu; Thu, 31 Dec 2020 12:11:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7yllkZ0y0f/yZFF14I9USIq6kI9dDpemqGizltmSjI6JeyBVJBB2DQ3w5hNoILVktUqLT X-Received: by 2002:aa7:c5d6:: with SMTP id h22mr11608024eds.82.1609445473608; Thu, 31 Dec 2020 12:11:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609445473; cv=none; d=google.com; s=arc-20160816; b=GrUtBq/V01F022LHnSIWrQeQnx15wLNfgsjxRmFy/HW2+JMzVQn9+GYsV/5X19d5pZ tjXokHPkjzrJ5lMKz/kKQ8N+w3TKutDDTo7RUaXlZ7zPtURUY5z4+fZuMDhNcK/iXErO 1F+2plhLvg0+45b4/IS46+jGN37hXlM4qEjVNNHBJjBkQuYFEyS0rB/R42SO4AViZZL7 n4+juvWFvXs0w7rv4ECZ4YwL1CuSssUbJYC7xWCozxNacpmk7fXwxvDsZHHbulij3nQj xaR536qoXDXUgw26WAadjw9XjUPeRrM7sV8MMc2niZZhIu41zAecMUJCxOlXCqLujFub b3xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=LUdKDlLlflhborB/8hVdW+VgkZLtdJkIlQCMkULEfnY=; b=qsedlmSzf0dk6AOxHyHdarp9HUQFkgwYdjYTCnTlrMNwymLB6t1FrMSt6fhbdZAiWO lltpeFcN2aF8HFKzD20vK9nypAaTcfNM/rWlIYksVsDY4muKU2RZmM0bOKZFZ4BfrTHz qZ/lqjVtFmztFyoHZDYEGrvOrc3x/dOkAZQ5xG/eaek3yWLhrByyQOURkrV4As04ywFJ 8KNa+sCTy2l3g2bDkU/X2q5ANXqADcGVLjqndX/qd9IuZJjrfppHHy93EpFt7wJnI6KL 7pdm2yYuX6OGuU9wziVSV985is7+CUwzGv1gQ6cifSyIclqJbQ1JLhCt7tXXlqVhuxy0 oc8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="q4OSIz/J"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w14si23877397eje.646.2020.12.31.12.10.39; Thu, 31 Dec 2020 12:11:13 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="q4OSIz/J"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726550AbgLaUI1 (ORCPT + 99 others); Thu, 31 Dec 2020 15:08:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726210AbgLaUI1 (ORCPT ); Thu, 31 Dec 2020 15:08:27 -0500 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6BEBC061573 for ; Thu, 31 Dec 2020 12:07:46 -0800 (PST) Received: by mail-pl1-x636.google.com with SMTP id j1so10405056pld.3 for ; Thu, 31 Dec 2020 12:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=LUdKDlLlflhborB/8hVdW+VgkZLtdJkIlQCMkULEfnY=; b=q4OSIz/JkJT0Z+P9uVNEenQw9LCMicx+csh5V1YclMspc2ubhEGsY9l8aXWn/1o2D2 tqsq+6zRnIEQMwGOBhYBOR9pibQi2htQPQreoUST292qXMsKVsAGim3LKXZ9E+zMie7M 52pwQiP+QDRiqEfB5yLl54UhEeUJ60jgAJwDEmxEkbKliBbXL/avFooqe6pFZMd1QB1x f3/SsfSySDPPrUOV8ywWsXStpQTqui22/EZnyTuI7YSk7qzrBY3irhTo5l7yn6rfj/Vz GGe2OnNRSe4tThPrYvn4loOQr6sb0xPyFqSteoIbplYoQzmBYtJfo/gJZzG5cX1u/qXP c+Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=LUdKDlLlflhborB/8hVdW+VgkZLtdJkIlQCMkULEfnY=; b=IkV4WO6q6gzIe071KDLCQHh2W/XuIUQYTS7Q2V56WTLiPs/95bJXIdYgmIxb2DJLvE bn3I6oZO/7svqV8m9tZZ5rqebmUSSopseLJcJ5+lKUYPlAuCTrj/t2fpQRs659bSNQ37 c/raN1gcOgZuPv0pnjxJKsbddB2mE1upG0mzkuX0t3FAe+VDTs03+YJuSQQVbXV/bX72 +oO5EjzYo7a/1RICqUu6+j3ARaNsIEQ8NWAbWJ8jwKI5cCjx+dXy4HICX2NaC/IAd6rF OfU3qzUkt/A6rYm/kZ2CuyJLFHSZ8fHqO6YJY6LzSLgFmcqGFoMBNwwhi8VKYjJQWoXR +9+A== X-Gm-Message-State: AOAM5316t10qQvB37D/FnIb9UTVJNjKxqbPGayLR62ofmcu0VWpTPUH4 QiA1GGNHvTSqPXhBP68m1HI= X-Received: by 2002:a17:902:6b0a:b029:dc:31af:8dc3 with SMTP id o10-20020a1709026b0ab02900dc31af8dc3mr36249199plk.41.1609445265935; Thu, 31 Dec 2020 12:07:45 -0800 (PST) Received: from Asurada-Nvidia (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id y189sm44418568pfb.155.2020.12.31.12.07.44 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Dec 2020 12:07:45 -0800 (PST) Date: Thu, 31 Dec 2020 12:07:57 -0800 From: Nicolin Chen To: Arnd Bergmann Cc: Timur Tabi , Mark Brown , Arnd Bergmann , Xiubo Li , Fabio Estevam , Shengjiu Wang , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , Nathan Chancellor , Nick Desaulniers , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] ASoC: fsl: fix -Wmaybe-uninitialized warning Message-ID: <20201231200756.GA15207@Asurada-Nvidia> References: <20201230154443.656997-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201230154443.656997-1-arnd@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 30, 2020 at 04:44:15PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > Clang points out a code path that returns an undefined value > in an error case: > > sound/soc/fsl/imx-hdmi.c:165:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsom > etimes-uninitialized] > if ((hdmi_out && hdmi_in) || (!hdmi_out && !hdmi_in)) { > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > sound/soc/fsl/imx-hdmi.c:212:9: note: uninitialized use occurs here > return ret; > > The driver returns -EINVAL for other broken DT properties, so do > it the same way here. > > Fixes: 6a5f850aa83a ("ASoC: fsl: Add imx-hdmi machine driver") > Signed-off-by: Arnd Bergmann > --- > sound/soc/fsl/imx-hdmi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/sound/soc/fsl/imx-hdmi.c b/sound/soc/fsl/imx-hdmi.c > index 2c2a76a71940..ede4a9ad1054 100644 > --- a/sound/soc/fsl/imx-hdmi.c > +++ b/sound/soc/fsl/imx-hdmi.c > @@ -164,6 +164,7 @@ static int imx_hdmi_probe(struct platform_device *pdev) > > if ((hdmi_out && hdmi_in) || (!hdmi_out && !hdmi_in)) { > dev_err(&pdev->dev, "Invalid HDMI DAI link\n"); > + ret = -EINVAL; > goto fail; I think Mark has already applied a fix :) https://lkml.org/lkml/2020/12/16/275