From: Rasmus Villemoes Date: Thu, 9 Jul 2020 13:29:48 +0200 Subject: [PATCH] rtc: pcf2127: fix uninitialized variable msg In-Reply-To: <20200709105823.7039-1-biwen.li@oss.nxp.com> References: <20200709105823.7039-1-biwen.li@oss.nxp.com> Message-ID: <5d211753-a8d7-87ea-7b30-87794309cb67@prevas.dk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/07/2020 12.58, Biwen Li wrote: > From: Biwen Li > > Fix uninitialized variable msg > > struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); > - struct i2c_msg msg; > + struct i2c_msg msg = {0}; > int ret; > > /* Set the address of the start register to be read */ > I assume it's the msg.flags |= I2C_M_RD; line that is warned about (please include such info)? Isn't the right fix to replace that by msg.flags = I2C_M_RD; ? Rasmus