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 X-Patchwork-Id: 1325903 X-Patchwork-Delegate: priyanka.jain@nxp.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B2YGr5643z9sQt for ; Thu, 9 Jul 2020 21:04:50 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EA857821C8; Thu, 9 Jul 2020 13:04:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=oss.nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 90B27821D2; Thu, 9 Jul 2020 13:04:41 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 21617821A5 for ; Thu, 9 Jul 2020 13:04:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=oss.nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=biwen.li@oss.nxp.com Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A89C21A1226; Thu, 9 Jul 2020 13:04:38 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 4B9FD1A121E; Thu, 9 Jul 2020 13:04:36 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id EB407402C4; Thu, 9 Jul 2020 19:04:32 +0800 (SGT) From: Biwen Li To: jagdish.gediya@nxp.com, priyanka.jain@nxp.com Cc: jiafei.pan@nxp.com, u-boot@lists.denx.de, Biwen Li Subject: [PATCH] rtc: pcf2127: fix uninitialized variable msg Date: Thu, 9 Jul 2020 18:58:23 +0800 Message-Id: <20200709105823.7039-1-biwen.li@oss.nxp.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean 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 */