From nobody Wed Apr 15 02:50:08 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78679C04A68 for ; Wed, 27 Jul 2022 10:01:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231679AbiG0KBJ (ORCPT ); Wed, 27 Jul 2022 06:01:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231616AbiG0KAm (ORCPT ); Wed, 27 Jul 2022 06:00:42 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11F49A1A0; Wed, 27 Jul 2022 03:00:32 -0700 (PDT) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id DB3FAC0010; Wed, 27 Jul 2022 10:00:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1658916030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=gWGk3O/39jRyG70XEIs0yy+M6P6aC9SXYdCpOIcWGAc=; b=VzeFWcLZgtQVOgZZTgdNslvBz0tTb4PkXgvzp79bm+WUZwAwxigyk+Gr70ktpMtGBxLBAW wVaKQ3MhJqOO5XWky5ME9x2eVJe4k2FvdpDsJ0W/fXeD0ymDDGzy1K2ojjQZIBtQMIKnK5 dZBQnOMWfR7SxX/r+JuidExS6Z/I7gNpcL+5hJS7bPPH3ci2OmYaeNiY+6A0EAbRyM9Q+g p/uvbahz+PoW3R7eSve9Sw81m6nOEXqkf5mdmNLX6G5XygXIzPVTUuNo7LqZUSLNXjdG0s xGvorWSHiM9NKcWKhLZMpChqHnBl+NMGjylDalsOP31rrqDz79CCYwKvb8ltlg== From: alexandre.belloni@bootlin.com To: Alessandro Zummo , Alexandre Belloni , Michal Simek Cc: linux-rtc@vger.kernel.org, kernel test robot , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] rtc: zynqmp: initialize fract_tick Date: Wed, 27 Jul 2022 12:00:18 +0200 Message-Id: <20220727100018.3301470-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Alexandre Belloni fract_tick is used uninitialized when fract_offset is 0 Reported-by: kernel test robot Signed-off-by: Alexandre Belloni Reviewed-by: Michal Simek Reviewed-by: Nathan Chancellor --- drivers/rtc/rtc-zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c index 1dd389b891fe..c9b85c838ebe 100644 --- a/drivers/rtc/rtc-zynqmp.c +++ b/drivers/rtc/rtc-zynqmp.c @@ -203,7 +203,7 @@ static int xlnx_rtc_set_offset(struct device *dev, long= offset) struct xlnx_rtc_dev *xrtcdev =3D dev_get_drvdata(dev); unsigned long long rtc_ppb =3D RTC_PPB; unsigned int tick_mult =3D do_div(rtc_ppb, xrtcdev->freq); - unsigned char fract_tick; + unsigned char fract_tick =3D 0; unsigned int calibval; short int max_tick; int fract_offset; --=20 2.36.1