From patchwork Thu Jul 9 10:58:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Biwen Li \(OSS\)" X-Patchwork-Id: 241116 List-Id: U-Boot discussion From: biwen.li at oss.nxp.com (Biwen Li) Date: Thu, 9 Jul 2020 18:58:23 +0800 Subject: [PATCH] rtc: pcf2127: fix uninitialized variable msg Message-ID: <20200709105823.7039-1-biwen.li@oss.nxp.com> From: Biwen Li Fix uninitialized variable msg Signed-off-by: Biwen Li --- drivers/rtc/pcf2127.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/pcf2127.c b/drivers/rtc/pcf2127.c index f695350..58c4ee9 100644 --- a/drivers/rtc/pcf2127.c +++ b/drivers/rtc/pcf2127.c @@ -1,6 +1,7 @@ /* * Copyright (C) 2016 by NXP Semiconductors Inc. * Date & Time support for PCF2127 RTC + * Copyright 2020 NXP */ /* #define DEBUG */ @@ -26,7 +27,7 @@ static int pcf2127_read_reg(struct udevice *dev, uint offset, u8 *buffer, int len) { 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 */