From patchwork Thu Oct 1 07:09:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 249825 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6330AC4727C for ; Thu, 1 Oct 2020 07:09:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1C69B2158C for ; Thu, 1 Oct 2020 07:09:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601536165; bh=RrOO/dbEnbrwC702tlxo6/rizE5c9N9saYv9zBvOWMs=; h=From:To:Cc:Subject:Date:List-ID:From; b=qtE6b2k5KEYVdpoJAuJzgKsQ22Dmtc4Z++lgIsoHuqKGLcIX2kXj04IU9qzzVzaFC 8aPkjiZ+0ET8jwxRV/Lz7IQpuRaSzDKuj1hhzq1+uQtnT1GUxrgRdqLMpYnmlJ7G/h bbAT26KqRFsKOo6Eg8hOh47mgr7QuxRde43Hfl+s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725938AbgJAHJY (ORCPT ); Thu, 1 Oct 2020 03:09:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:42844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725878AbgJAHJY (ORCPT ); Thu, 1 Oct 2020 03:09:24 -0400 Received: from localhost.localdomain (unknown [122.167.37.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5D85F21481; Thu, 1 Oct 2020 07:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601536164; bh=RrOO/dbEnbrwC702tlxo6/rizE5c9N9saYv9zBvOWMs=; h=From:To:Cc:Subject:Date:From; b=IBjNcf7YOD7SmkwdBQudIQxU8fB8F2GLQO+bZv2O0AByBC2ZNgWzx8PuzxM0YLiml Detw1tjJd1vclcoOyUbkz9MFkV+qb3UCb7M0lvmY57AniFlMNXswmJBpeK0kQojkqO U2CD3tT7SeXMXJqaQSkN8WDhXGL2fcbdsUCmUFSo= From: Vinod Koul To: Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, Vinod Koul , Stephen Boyd , linux-arm-msm@vger.kernel.org, kernel test robot , Dan Carpenter Subject: [PATCH] phy: qcom-qmp: initialize the pointer to NULL Date: Thu, 1 Oct 2020 12:39:11 +0530 Message-Id: <20201001070911.140019-1-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Smatch complains: drivers/phy/qualcomm/phy-qcom-qmp.c:3899 qcom_qmp_phy_probe() error: uninitialized symbol 'dp_cfg'. drivers/phy/qualcomm/phy-qcom-qmp.c:3900 qcom_qmp_phy_probe() error: uninitialized symbol 'dp_serdes'. drivers/phy/qualcomm/phy-qcom-qmp.c:3902 qcom_qmp_phy_probe() error: uninitialized symbol 'usb_cfg'. This is a warning but not a practical one as dp_cfg, dp_serdes and usb_cfg will be set and used when valid. So we can set the pointers to NULL to quiesce the warnings. Reported-by: kernel test robot Reported-by: Dan Carpenter Fixes: 52e013d0bffa ("phy: qcom-qmp: Add support for DP in USB3+DP combo phy") Signed-off-by: Vinod Koul Reviewed-by: Stephen Boyd --- drivers/phy/qualcomm/phy-qcom-qmp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c index 6171b44da050..5d33ad4d06f2 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c @@ -3928,9 +3928,9 @@ static int qcom_qmp_phy_probe(struct platform_device *pdev) void __iomem *usb_serdes; void __iomem *dp_serdes; const struct qmp_phy_combo_cfg *combo_cfg = NULL; - const struct qmp_phy_cfg *cfg; - const struct qmp_phy_cfg *usb_cfg; - const struct qmp_phy_cfg *dp_cfg; + const struct qmp_phy_cfg *cfg = NULL; + const struct qmp_phy_cfg *usb_cfg = NULL; + const struct qmp_phy_cfg *dp_cfg = NULL; int num, id, expected_phys; int ret;