Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp168350imn; Wed, 27 Jul 2022 03:03:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tCUdW7y0iq+uqYrRbgIagzkkJc3R+jpXsnHdU1DaM8l3k64lYfybKa6lQfQ/3rFEZf+Me2 X-Received: by 2002:aa7:ce94:0:b0:43b:bf79:e9c3 with SMTP id y20-20020aa7ce94000000b0043bbf79e9c3mr21937845edv.57.1658916226515; Wed, 27 Jul 2022 03:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658916226; cv=none; d=google.com; s=arc-20160816; b=vP93TlQq+f4vOeorTA3TaOLcYkiRI0bj9qfz8hJuEGQKttUhPRCgGx3M34nVnn66VY 2XJcxF227leLytkKWM+9Y4vkqXhoxO0Z5kE/PTxGBE4cDifYA+IkNFHUd8qUKk3ZkNW2 Ho1yqIDCCKXMax/9bANfJg05m0gF7uPdiwEit2G7W4g3sw0eYsIv33/nm3+QFddhXgIM w4N0ONGirFY8YBoV5xrDYKa0Lary7wUn4H2iOARhWavpUNtSbyNdq3cCk1CuqiZJrMa8 hjTu7C/zuMTsA7HSROe1QrjWaxC7iG1S6s9GdMtL+VjDRHJ6ciCcmyFVvV62Vf/Jh6op 22+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gWGk3O/39jRyG70XEIs0yy+M6P6aC9SXYdCpOIcWGAc=; b=uUyqyP65iwoba2cSPmxiQPL+T+vV5yNXwHlGHkqFThjtW1Th1c1rPHvY0sg72/0N6C zDLoEHeK6ngUqs5Qt5CP9bL2HVnAqLglGviwmNbCAb+jDmx9Ca4VBo+wvFuBO6bk06Oa rMeE/911DI0z+PJB96jnrOedmymOinIoXEsww3pwLpdhU7sOdslvZX15dZymlGyYETvn Y/h8SqlGWiP5GLDY2Ev7DFZ1IbzLqJ2QXNZkuKFsS7mK+yi/K6kSLpHiydoNZa5j+NqV h9D3LNpYMmNDC8buGz3jFx5ZXHRI9S39ia2Jd9frTHg56ea5pgaM7CKvWewjO3Ns/jXb yURw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=VzeFWcLZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw12-20020a170906478c00b0072b7497075fsi18896812ejc.828.2022.07.27.03.03.21; Wed, 27 Jul 2022 03:03:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=VzeFWcLZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231769AbiG0KBG (ORCPT + 99 others); Wed, 27 Jul 2022 06:01:06 -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: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexandre Belloni fract_tick is used uninitialized when fract_offset is 0 Reported-by: kernel test robot Signed-off-by: Alexandre Belloni --- 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 = dev_get_drvdata(dev); unsigned long long rtc_ppb = RTC_PPB; unsigned int tick_mult = do_div(rtc_ppb, xrtcdev->freq); - unsigned char fract_tick; + unsigned char fract_tick = 0; unsigned int calibval; short int max_tick; int fract_offset; -- 2.36.1