Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp11127315pxu; Thu, 31 Dec 2020 00:16:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRqMBV+hqkIZPloWZ+FUrrrKHByk7yRsFDz+WAmNvlaQTkrNd2cgPI2o+rchmpJdGlCJ3c X-Received: by 2002:aa7:cd63:: with SMTP id ca3mr51855392edb.164.1609402572826; Thu, 31 Dec 2020 00:16:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609402572; cv=none; d=google.com; s=arc-20160816; b=QdvzpES7/TiR9QPA9/61wTE4d+RL12dyLe5J4JHEPvu+JcuZyzNaBg7Ewak3UkPo8G IIhKAOUFNlrsmEoiIV0muzsOlYNVrfYoC9EnZw7LgKLZhuXHjQ2rmy/ZxrsOUh3hgkHX 2DwVpt8iIp/h1ICU3Bm99akOKjeUmhajfnrZvXRztE9Hd4YydwN0shN/p+WHweZes8n5 B4XdxY9la0IhT+y+Pk+ttinIEjQFiPzdNBmQuzOm/d+REPUc2/1/HRaFBjteZiobT26R D2fdQKvXuXQNZ5waogCUvDQhjsgePqUtHzaVhFR6Z6NcVeI5Hy9hrDl74JOzNs6SRXH2 5d/g== 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=t3sCvs+FLAqfEmFOY3gSWy3C5FD079L2BEMz5q0+2bY=; b=ieznsp6gtBcnXKOl4W/t2IMoR390ajZBTFByiHRDlm2zVUFfpTi5075NMqlf+J/e/D Vaq9R6knqh4JVuHqv80b1iTM21iBkaAJp6RdEAGp75+hRYklW/aGyVsYawTSkhXz/JfP +MxMqBiLHUtLD6COJXG1UeU4OJj8jrR4dAomrh724wYIXXa1dlAIAWXhggWjipyWvQZO LuyrnXlu3fIcEh+QfITMxsq6L4NQt7cffKqwbsnjolRC1Ir1nD6dFUHsiIKYH6x9F/cP qF5wAv55vGpWsR0hJHrSR4lVR4cxYzV8g5rGXTPzElgk0+N1B6Y1ccYO+GKUIPMr60X6 b2vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OkZtmlJL; 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 l19si24294383edq.537.2020.12.31.00.15.38; Thu, 31 Dec 2020 00:16:12 -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=OkZtmlJL; 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 S1726232AbgLaINZ (ORCPT + 99 others); Thu, 31 Dec 2020 03:13:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726037AbgLaINY (ORCPT ); Thu, 31 Dec 2020 03:13:24 -0500 Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71AEDC061573 for ; Thu, 31 Dec 2020 00:12:44 -0800 (PST) Received: by mail-il1-x129.google.com with SMTP id 75so16776957ilv.13 for ; Thu, 31 Dec 2020 00:12:44 -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; bh=t3sCvs+FLAqfEmFOY3gSWy3C5FD079L2BEMz5q0+2bY=; b=OkZtmlJLPwpYGEBhlMTlxC1UNnPNxBb2enYNiFsvCETew052T/SM529w00lcZ0fkU5 DxiAtfdG8AYnhPcUYDCLhQw30Pb+ngkdcM6cwNWgNn8pByZaN2K3aSG2A9pRE/bJ8/z8 5qv7tFwZyFVcLOVEXFxINtfell5leVzCMDegQwV63WYi8gfCDuh/Cp1qG/tCa/z+FSwh BK5joIczA34jFH5vo97p8k0BzClO9gA1LZSYgRuBJDRZJkkPar5IE905+skQb43AJvoA 7Etsuhic3bu54GcaoTvgKEG6C8epT7F+fos6MZ/LRuETJImDYOBGc0QFIkj2G4G2FRz5 3WQw== 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; bh=t3sCvs+FLAqfEmFOY3gSWy3C5FD079L2BEMz5q0+2bY=; b=Rg2mBEF5GzM8KOI+UYM7Jck8sVt4O8zfesHqcYTQe3Yua7aOxlOYbNZYb27/60mecW xVXbGqEX/7hafUT3JLtzregHsIJssdlNqgDRnyWqE8y0q4RpcCoTDKLA3syIVApNH3mr 64H43l4jaouFhFilxzAtBcf2yQmrvGCOgSpmZDcjRd0O+Bg5HeFlQK0m/RFbdXq3PauD MvFsq3DUzULe+Zucdiknqc6PbHeC/m97UWX9d8Jxj5wJAFfKrDZW8q4kX1oG74HVza1n 0aJ7vK7oCNcCG0aQ0BH56v/oWlbAZDYA6RkJ1kjLxvN+curJVIQMwRHNa3z6vW5Lg1+W 0CiQ== X-Gm-Message-State: AOAM5316wGpMRcl9tTXXjvRi8UBbIbsNeh+lq+kHYCE6x/N5HAKwHzWU VFp+IfCSzIPdY3o/agmbVTE= X-Received: by 2002:a92:8404:: with SMTP id l4mr54964892ild.49.1609402363602; Thu, 31 Dec 2020 00:12:43 -0800 (PST) Received: from ubuntu-m3-large-x86 ([2604:1380:45f1:1d00::1]) by smtp.gmail.com with ESMTPSA id r10sm32437881ilo.34.2020.12.31.00.12.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Dec 2020 00:12:42 -0800 (PST) Date: Thu, 31 Dec 2020 01:12:40 -0700 From: Nathan Chancellor To: Arnd Bergmann Cc: Timur Tabi , Nicolin Chen , 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 , 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: <20201231081240.GB1970946@ubuntu-m3-large-x86> 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> 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 Reviewed-by: Nathan Chancellor > --- > 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; > } > > -- > 2.29.2 >