From mboxrd@z Thu Jan 1 00:00:00 1970 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 60D38C433F5 for ; Mon, 31 Jan 2022 11:39:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378323AbiAaLhx (ORCPT ); Mon, 31 Jan 2022 06:37:53 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:42802 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359698AbiAaLZV (ORCPT ); Mon, 31 Jan 2022 06:25:21 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B4F9FB82A72; Mon, 31 Jan 2022 11:25:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C94B2C340EE; Mon, 31 Jan 2022 11:25:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643628319; bh=JYdwXVjLD3x1rCvNs/UGJbi7gDiPUI4GZnEf8WfRi5E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uHihvoXeGvqU13jtxyW4X/WE8x4R9XntUV20sgVjLNt/td+A2VoEwgnZpCELrSsxZ JEEUoIsO9j416ILjARYTv7Bo39nqw+UGKaUFjmue02rWvvM1KCtQeZdBkduP3LUzdd ZGH/PiAOINGpCOoAibfva1M25WzVz520mi3IewGo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Robert Hancock Subject: [PATCH 5.16 194/200] usb: dwc3: xilinx: fix uninitialized return value Date: Mon, 31 Jan 2022 11:57:37 +0100 Message-Id: <20220131105240.065673378@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220131105233.561926043@linuxfoundation.org> References: <20220131105233.561926043@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robert Hancock commit b470947c3672f7eb7c4c271d510383d896831cc2 upstream. A previous patch to skip part of the initialization when a USB3 PHY was not present could result in the return value being uninitialized in that case, causing spurious probe failures. Initialize ret to 0 to avoid this. Fixes: 9678f3361afc ("usb: dwc3: xilinx: Skip resets and USB3 register settings for USB2.0 mode") Cc: Reviewed-by: Nathan Chancellor Signed-off-by: Robert Hancock Link: https://lore.kernel.org/r/20220127221500.177021-1-robert.hancock@calian.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/dwc3-xilinx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/dwc3/dwc3-xilinx.c +++ b/drivers/usb/dwc3/dwc3-xilinx.c @@ -99,7 +99,7 @@ static int dwc3_xlnx_init_zynqmp(struct struct device *dev = priv_data->dev; struct reset_control *crst, *hibrst, *apbrst; struct phy *usb3_phy; - int ret; + int ret = 0; u32 reg; usb3_phy = devm_phy_optional_get(dev, "usb3-phy");