From patchwork Fri Apr 14 12:22:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 13211417 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 76FBDC77B6E for ; Fri, 14 Apr 2023 12:23:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=jiDUooYnAaaO0fzF3xMq8gonVnlJuapxMt9Kd6oxUjs=; b=b+WQd1UAPSKHH/ SUKjjxxpSxkr9R3uEcE+LXcQhfpqwOhc9nah/fkbOeWAynVlsx9kaM8WZ9gwsJsnF61+S+YogxWq0 p2GrSzMscQhNsrjeozijllu4dE4raRDe7unBYQYmiR3RuaGD3mvOe8dif8ok/3UwT0oCivd9VwcJs lqC9YLbyT0LHm0cdlOZ48XWAQNByFG3qe+bOORbcZqDsQSM6aZxS4y1WsjSt8YaQVVR4f7RUDRKxq mWcj3NkkD7D3oMQMUwO/eklS8LSTxBCMlAXcyu+YYxrihTyaZfxs7IM3hJJjZrqAybl2x9VokNrIO Xy0cqQV3122OXDCIEpKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pnISL-009VBd-18; Fri, 14 Apr 2023 12:23:09 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pnISF-009V8P-0Q for linux-arm-kernel@lists.infradead.org; Fri, 14 Apr 2023 12:23:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681474978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yPCGffG6qbUGI7F6FTErQ0LH3cHGPkEEbnsErQvfFxw=; b=d6PnMEWxIEnlFOxVIYUoL7RiGW/uvbjKlhFdb3Em7Q3Xt+gutyuSo4HPBIks1hJccS8m7W /GDM9ZugroNXxmJkQKO8W45un1ES2HPeXefFLCZoGiYKcaWJ/jPxB24AhSGXEBr6fR+uWc AC9un9vaSto7WmjzCwQKKqiu8I74kLg= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-613-eDV_UYp9Odmza3h4N-W7Ig-1; Fri, 14 Apr 2023 08:22:57 -0400 X-MC-Unique: eDV_UYp9Odmza3h4N-W7Ig-1 Received: by mail-qt1-f197.google.com with SMTP id h20-20020a05622a171400b003dfd61e8594so12988138qtk.15 for ; Fri, 14 Apr 2023 05:22:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681474977; x=1684066977; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yPCGffG6qbUGI7F6FTErQ0LH3cHGPkEEbnsErQvfFxw=; b=WgAGfNIGt4FFwBHIlDXpJS31VOJTxMk0AUWhYyaG9pulW8jZ5i99Dsgdvceh9nGn0r 465w91r0Y2VPP6N5cv5EVyzoSPngt0U8Jlfv6Oz5dUmdPJCb26IhNsHKioQB8EiYdsFD +zHM2hF9EwO2xzvdbBtiqF1pWAlX7OuZld6RwVTGYyzCE3drUqP7SyJ2jqPzfBfQD8Os SThSAj+VKMQL/HM03T8jqQIKcgjSID3IVcPC/MiszPHJ6leuTRR6YkMj5FvRlab4KOmV VOwQYaJPnd2IJYktEQohSzw6OTAkSnrFza/QiT2phgUi9UAKmx/YkLCatxdQl56jK7+w TnOg== X-Gm-Message-State: AAQBX9eWMfZ5ky+9QlH4JqOp5ru3mBwLWcbEkvITVC0PuYDN+aykrd2T mDG//3DpQNptxHsINbDqwEhl5iNbYA+jztrQ6qPfbwEoCpDo09nBrpAneJkrZoMiwoKQzJ7L0fw /3AvrFHJqksL9K77Bej31o4zopadT1EkALzU= X-Received: by 2002:ac8:5945:0:b0:3e4:e2fa:66b0 with SMTP id 5-20020ac85945000000b003e4e2fa66b0mr7771669qtz.29.1681474977222; Fri, 14 Apr 2023 05:22:57 -0700 (PDT) X-Google-Smtp-Source: AKy350ZrFNjLa1K+ogArho3OQ0SXUeh36MSY9HRSMAimwdY9UWoY7qElQIx2CPz+MS7Z6iLrkNomrA== X-Received: by 2002:ac8:5945:0:b0:3e4:e2fa:66b0 with SMTP id 5-20020ac85945000000b003e4e2fa66b0mr7771633qtz.29.1681474976909; Fri, 14 Apr 2023 05:22:56 -0700 (PDT) Received: from dell-per740-01.7a2m.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id r4-20020ac85e84000000b003e302c1f498sm1193420qtx.37.2023.04.14.05.22.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Apr 2023 05:22:56 -0700 (PDT) From: Tom Rix To: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, chunfeng.yun@mediatek.com, vkoul@kernel.org, kishon@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, nathan@kernel.org, ndesaulniers@google.com, granquet@baylibre.com Cc: dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Tom Rix Subject: [PATCH] phy: mediatek: fix returning garbage Date: Fri, 14 Apr 2023 08:22:53 -0400 Message-Id: <20230414122253.3171524-1-trix@redhat.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230414_052303_414937_A4A89CE4 X-CRM114-Status: GOOD ( 10.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org clang reports drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c:298:6: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized] if (ret) ^~~ ret should have been set by the preceding call to mtk_hdmi_pll_set_hw. Fixes: 45810d486bb4 ("phy: mediatek: add support for phy-mtk-hdmi-mt8195") Signed-off-by: Tom Rix Reviewed-by: Matthias Brugger Reported-by: Linux Kernel Functional Testing Reviewed-by: Nathan Chancellor Reviewed-by: AngeloGioacchino Del Regno --- drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c index abfc077fb0a8..c63294e451d6 100644 --- a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c @@ -292,9 +292,9 @@ static int mtk_hdmi_pll_calc(struct mtk_hdmi_phy *hdmi_phy, struct clk_hw *hw, if (!(digital_div <= 32 && digital_div >= 1)) return -EINVAL; - mtk_hdmi_pll_set_hw(hw, PLL_PREDIV, fbkdiv_high, fbkdiv_low, - PLL_FBKDIV_HS3, posdiv1, posdiv2, txprediv, - txposdiv, digital_div); + ret = mtk_hdmi_pll_set_hw(hw, PLL_PREDIV, fbkdiv_high, fbkdiv_low, + PLL_FBKDIV_HS3, posdiv1, posdiv2, txprediv, + txposdiv, digital_div); if (ret) return -EINVAL;