Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2077683ybv; Thu, 6 Feb 2020 15:31:57 -0800 (PST) X-Google-Smtp-Source: APXvYqy+GTGwBY6UTkXlOjFZSpt5cDEWoY/S4bUrRwNDf02ouhKC1TAHa3VtgcTaI3JvGxVXgnbE X-Received: by 2002:aca:1012:: with SMTP id 18mr152595oiq.151.1581031917403; Thu, 06 Feb 2020 15:31:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581031917; cv=none; d=google.com; s=arc-20160816; b=QRm1GCUibuO23o5f+871dZJoT4qLYljeu+emLgPosUGQbc46DjxLBWg6przoZSuGj/ L+BUk1H1KqhaE6MOYfSZ1mpcXyuS6Td/FO8QYaXNBmOAOoubcpoXrXOyL5JQizWuY2Vz goa3dFt/i9NxduQ9XnU67ZzEAAfr0eqrP3TBorNi9pTU+qEBTBoH9xPX3fSxrW4gRqP5 AjZZcf5sfrb0oI8IRC4ngS7EBnE0CM/PU55b9uqMdJGE7jqH4w9NaxCVImHNa64zPI4M 6SjfcX+xhFzEcs7+xXTZzYCzdj1crpJRjPZcdGwhk0B720GtezqFshckH8fR6jwYZVZB iaJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=PSJH9GYraFPbhcG+DGJnLRxMg/i8Sc5VCunvDN6ByYQ=; b=SfQ/gu+7IexsZ0McRR8oImsg0XSEeTWtfOiCV8AFF7lMwjVP6v1toWmlsbMLAtOIpl sSa5pgcS/kHXsnEXXmlS5bbVhvSjRTGCi8liy23U+JeE6xCMCI2Gs7mNYrMHSszBBqGD UOnxm0QRPXq7EaUc7T/I1CjMYR7A7f3ojFOAFXDikaC6S7OWhRpgrnQfQJ7uzLMl81Zw eFivMvZJiEPKG/1RL1ieDfgVhLCmVEShm8hCSahL6VxEIXCbteAk4wGglVUCOVw73R+b TdAkebc+b/vApSl9mJt9hiPz+GUJ34Azqy/R00hqC+iP+nhJh8JaJVSCW765BnOpZHIX x6oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ZcKoqhVq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 25si2806698oiz.230.2020.02.06.15.31.43; Thu, 06 Feb 2020 15:31:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ZcKoqhVq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727129AbgBFX2n (ORCPT + 99 others); Thu, 6 Feb 2020 18:28:43 -0500 Received: from mail-pl1-f201.google.com ([209.85.214.201]:53024 "EHLO mail-pl1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726502AbgBFX2n (ORCPT ); Thu, 6 Feb 2020 18:28:43 -0500 Received: by mail-pl1-f201.google.com with SMTP id c19so145971plz.19 for ; Thu, 06 Feb 2020 15:28:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=PSJH9GYraFPbhcG+DGJnLRxMg/i8Sc5VCunvDN6ByYQ=; b=ZcKoqhVqqTxaA7bcY8f1rBLOLO2Mlig83ZXxynCX61+JalVusJ5YJZuiZQPmpNMDhf qxHbsKwEo+cMzNEoJ2u7H+ZwvQOiIb/udcQF70az20a4Bpk0w9WHnpSjajxQ5hB4ijfc X2uSaNAiJrkMGCJ/uRZ2BkjsQ5dEpv2kyNN6CGK7P4MIPSBCZlgYMC/VePgg0c9jN7mv cpF+JJblF4iEO00UI1S9tHbJ892XOaCfG8gmnOyhdAHFVtTDelqzIBWMwbmKYeFiKZbq msmqODnP8qH3gI7v1zwWTLqqsZ5nJoQdPb6O76k76Qni2tEulHYLM68KfzR58nacD8dQ BwLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=PSJH9GYraFPbhcG+DGJnLRxMg/i8Sc5VCunvDN6ByYQ=; b=MgdxhTLiNROshQqjM3fH6pXADWnOQw6FIK4+p/fRETwTh07+JadfWP4debC/1cMyoE CnQ5QwvUE4ta1owPe3/upL5zyQLpHhdgLI8fu7i/IfgyVgWmsIUoFe/a3DdsE0bqF1uU rEdvcEfiIGxBznW8aNcpXZuGbvwfklwegwA8sGDzcnCjF6lU0EMxrkhWwiPEqi1w39qB EqHqsT15CDINHwEdtGQlo9qGAmoVXojcVwhBuZJrvAM4rNkrtIAJzg6H7EWmc7Yvw3re Jnld81srVIJmyJHgCwk+HzvIrNXMPK1FuG2jlu2Zw85BGMmBnALblcxdgr6IsaeXRVk5 nbmw== X-Gm-Message-State: APjAAAVY2JNstfO2yrc/zEJa6s9uveeGh4neijCP8iMctTwuLckaB85W iBT7LB+/ec6pskC02JO+yFvOeQrM0v6YRFNn1m0= X-Received: by 2002:a63:ba03:: with SMTP id k3mr6733096pgf.52.1581031722616; Thu, 06 Feb 2020 15:28:42 -0800 (PST) Date: Thu, 6 Feb 2020 15:28:40 -0800 In-Reply-To: <20200206200345.175344-1-caij2003@gmail.com> Message-Id: <20200206232840.227705-1-ndesaulniers@google.com> Mime-Version: 1.0 References: <20200206200345.175344-1-caij2003@gmail.com> X-Mailer: git-send-email 2.25.0.341.g760bfbb309-goog Subject: RE: [PATCH] ASoC: soc-core: fix an uninitialized use From: Nick Desaulniers To: caij2003@gmail.com Cc: alsa-devel@alsa-project.org, broonie@kernel.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, perex@perex.cz, tiwai@suse.com, clang-built-linux@googlegroups.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Fixed the uninitialized use of a signed integer variable ret in > soc_probe_component when all its definitions are not executed. This > caused -ftrivial-auto-var-init=pattern to initialize the variable to > repeated 0xAA (i.e. a negative value) and triggered the following code > unintentionally. > Signed-off-by: Jian Cai Hi Jian, I don't quite follow; it looks like `ret` is assigned to multiple times in `soc_probe_component`. Are one of the return values of one of the functions that are called then assigned to `ret` undefined? What control flow path leaves `ret` unitialized?