Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp880288imu; Fri, 4 Jan 2019 08:50:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/WFOn83W3glTL9T+paEopY0LGL7+9POFCQqM5Mza1pXQK0Q2rgJXOnzEua/58foDnkcJwKu X-Received: by 2002:a62:ab0d:: with SMTP id p13mr53130696pff.211.1546620614103; Fri, 04 Jan 2019 08:50:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546620614; cv=none; d=google.com; s=arc-20160816; b=h/eHtGjXHOY6DtxTxnunZVML5cre8g4rzsr2VeZ6m32FDCI+EBudNjoZaKBorAbzww qHXWTCJHni2mcewOWTOYxSuYtvhF7/QVPYlJigZZb8p6nChPEMHrbV2qak5/OGFfwz3y 99VJVCbvmtILaa9LxgHhTcp0ViSIO22cKWiO1KAXtn5em1PallWfvCyiZcH8Rr90Asm5 1FSmtF0/8pKLWjPBkYxyfSBAvAqDoAvbgIE4ibZgsnYhzkJUf4WIsgvulgCAYwYrBmjw a/9A5dtIy0OyTEs8ZxAREUh61ICza+SpY3hxuteIrLhpx9gYxPxjPDx5k2V/Bm6xJu1L jHpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ZkU6YOgn2Jbae0n58vanftXAPvSvmX4NS8Sp9B25s1c=; b=NIUAEjt/+HnuqbdQ/ZRixY9rVzz3f3qqyrh3nc3bsyfm7xFRaSBOIM3e9aNGxYG4NM DGiqE9iZwWgglbasNOnkhj/0tXW/bWDkA1bk850xjyKQb8bP7U3Sty0DSf9DKHPEiX30 Cr+Hi4l8ZkhxYFreCi2thisPyIiNcx7isAWXNSzC+JhHuB/1bb7MooT85KfwagHwZEwU Ax8ik+YAIobSP9LN1S7m/tGpXMxY9UYRe0D+kHtMxLG36iiBlBUnOsqrLhojhGi8QdtN p0SHhZKzVLyhdJAObKqJr32kzWrLlwlVAewpZo9/RyNN5/zM3TKeRqphuMEkRuUFgHIZ YPyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b="vQeFlz/2"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o89si57733381pfk.223.2019.01.04.08.49.59; Fri, 04 Jan 2019 08:50:14 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b="vQeFlz/2"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727134AbfADNuA (ORCPT + 99 others); Fri, 4 Jan 2019 08:50:00 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:34222 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725939AbfADNt7 (ORCPT ); Fri, 4 Jan 2019 08:49:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZkU6YOgn2Jbae0n58vanftXAPvSvmX4NS8Sp9B25s1c=; b=vQeFlz/2D9QB3TwQnI4cm7woM odsJ0QnF6MQCQwg06tICWTnzFmiL3B4Y5ZeultgbCOT0cWWVan8y6QL+jPhc2dZCladUmIPf7MInM XaBqeeOLJ8+R34lqW9h2j0O04QLwZYra1zNAPSVuzCwWhlDrFwsBS32hd/JEPNTf7VBMs=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gfPqz-0001OS-Lr; Fri, 04 Jan 2019 13:49:37 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 1BDE711270A3; Fri, 4 Jan 2019 13:49:37 +0000 (GMT) Date: Fri, 4 Jan 2019 13:49:37 +0000 From: Mark Brown To: Yizhuo Cc: csong@cs.ucr.edu, zhiyunq@cs.ucr.edu, Bard Liao , Oder Chiou , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Variable "val" in function rt274_i2c_probe() could be uninitialized Message-ID: <20190104134937.GB4140@sirena.org.uk> References: <20190103215912.6071-1-yzhai003@ucr.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0ntfKIWw70PvrIHh" Content-Disposition: inline In-Reply-To: <20190103215912.6071-1-yzhai003@ucr.edu> X-Cookie: An idle mind is worth two in the bush. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0ntfKIWw70PvrIHh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jan 03, 2019 at 01:59:12PM -0800, Yizhuo wrote: > Inside function rt274_i2c_probe(), if regmap_read() function > returns -EINVAL, then local variable "val" leaves uninitialized > but used in if statement. This is potentially unsafe. Please use subject lines matching the style for the subsystem. This makes it easier for people to identify relevant patches. --0ntfKIWw70PvrIHh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlwvZHAACgkQJNaLcl1U h9C6jwf+Keh0tNKg0i8mQ5uxEDQ1Lg7bBW+fmCUAddmRcYyHe3lllL3fuauZDonb 84ms+X7TxqSJ3KR3sB1EnHb0xktJsPqkG1asj6WDdiLNteREWJyXqjH4f4cfXU+n hLJ3LBzfBm/rJWKBV4NqLz24MvS96nasql+VW2H1b9hjr9r5fmtJeqXEMwHHCF68 dub9Yqwp1V/BWetT45o7PWQ//X5KqIa9nIxlTAzzCUGOzSwDNp4mCiN7nwDEQySW HAt611Inky8+BMHWxKdo8rwwqxNMwx011hu9mk/ZAEkHuRaySiD8Bb8zSULj9N2N NFS35byS6C4U22O1HUNHpoWuc2C+sw== =FRPy -----END PGP SIGNATURE----- --0ntfKIWw70PvrIHh--