Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1754298ybb; Thu, 26 Mar 2020 06:46:44 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsU6QXx3v2/OgelmO75fmFYi07/9N/0OmXG/u90S88NILpygvVyXdZF5jtCrU+oN3CSrbbM X-Received: by 2002:aca:da57:: with SMTP id r84mr43278oig.79.1585230404178; Thu, 26 Mar 2020 06:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585230404; cv=none; d=google.com; s=arc-20160816; b=ETOmFBoS/9WtOJXUbPeOsz6Cjz8T5oF5An5kSSekZAKX7T2ELNm/pqawSwMuG4wq1J c9DK63Tsj6122T83ZXIQQ8O7ZUWXLrWoxlYktCic0CmeyZk/GUbWZ4s8nllNIX5PPNPb cGY1aLAXQBQO+5XvbYgqZMUzf10eEitxG7V6augwr4NPxhBO+vfsAC0eOLDNs/KDd7yT A4SyHg0nfqURF2y3GkaUF7/rR3qQrNIW0+mFPiEY9/cpVTPe04bb69cFVqI5siEeKoI/ ndwS23nWYrZ3o3yr39IZ4CSwFdVK4DucmuRef8rEQzmzdEKHYU0r/xIHzH2usdXCFDce oGwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=E2Nej3PvIghRUOKzyBo4bIwNfTfqhNtg3/diQuBc7As=; b=aBIE2WdHXC649lOlBxV0wiYDtjNNMALwzrCXDArSpl2cxG94q6Ca3YDHmY7Abc8B7H LhyPF1Gop/PTBFCM3+o8MxGLMLIoEmxCF1B9RHYmIhuPz9KWZLdgSbYZjBN3pKUdeYmD 5f6MSBy7c1kEDXH4Kcyrz+WBxFXG6IiNWkU+q+37f3QyTfQgr+H9jfwD2VWyc7YX2121 osmT55HM13MI5MlSMwUrVpvvHZhDPBRTnq6IXGIDZHQ1fbc0K2/OMogvuJOASnmrF1eN 0MlNtz66LgoZtLDFmwBLBPx9LCiaU+1+4TDtyJGqXxt6mgo1Oxjf2bhDVor/kMCDTPkE XYpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=EBSK+E9N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b22si1059823ooe.7.2020.03.26.06.46.32; Thu, 26 Mar 2020 06:46:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=EBSK+E9N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727874AbgCZNpY (ORCPT + 99 others); Thu, 26 Mar 2020 09:45:24 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55065 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727832AbgCZNpU (ORCPT ); Thu, 26 Mar 2020 09:45:20 -0400 Received: by mail-wm1-f68.google.com with SMTP id c81so6511979wmd.4 for ; Thu, 26 Mar 2020 06:45:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=E2Nej3PvIghRUOKzyBo4bIwNfTfqhNtg3/diQuBc7As=; b=EBSK+E9NDW6/g5NS8KEfKOXbeCyuAzwOTDTO1vQwh0l3zrv8Q2tyK/LrydSklc4JX+ pqsTOR4naUDFKVaVpM1TqekGxLf2R03Yg30rMeFkiES78oulP5qC5aCOZ66Ku27ITvYq OVevZUCL3r8VcaWFHv9qIPfi5YBlHdnrk2HJiQGdHpq1h4T7m3VLpePVbjr5hM6yCWu6 +w1U1yZCLQJt16R2im4++WMu1WiU7m2qkpA0eOum52mdnKyyjQqUWYrMxmxu3Yrs5dxt lxOFJOZmCbfFlS3sErPEPe/+Lj5XimXNaignHRINQQKQ5JzcTo6a4XJeC85hfOe0nsQ6 E6dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=E2Nej3PvIghRUOKzyBo4bIwNfTfqhNtg3/diQuBc7As=; b=PJl28aCqWG53OKEWWz+eWw7G5pRihui2rpX7/OiHAxtN60b/UrNkHT4gcugnfly+qE hqKrXfeP7D+nWiOGSVhLfcSLaLIZZa5IQzt6MQL//eJ1bwMG+UdQEwKTrR8AlkGgdvkl RbRBxe3ic7nLJ13B/ORfFRnQR7hWudkK8j1R6kdkDJeOenT1r3F3WR7vQcIGXjmw52Cc qmeCvKAbc2qdlxcyqQMeexoP79QjwAWcLYQ7T7IETwKGmtyaE8BWCGKEhhJB2Mj2CFhH nlSCDWEjEds1yYr1hxjO5kN+N80w1Zs0TYr1u2H73BJBMDUw+9pFmvO5VLkNn9nwXqa5 Y1Xw== X-Gm-Message-State: ANhLgQ3twBOjD80QvnynIwubJRQjsI1KyfDGyrApH59dvIYlC09GsjUY W62ab+HHFMrZAi8PFQ0OmH9BCQ== X-Received: by 2002:a7b:cb42:: with SMTP id v2mr43647wmj.170.1585230317388; Thu, 26 Mar 2020 06:45:17 -0700 (PDT) Received: from bender.baylibre.local ([2a01:e35:2ec0:82b0:5c5f:613e:f775:b6a2]) by smtp.gmail.com with ESMTPSA id h29sm4079617wrc.64.2020.03.26.06.45.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2020 06:45:16 -0700 (PDT) From: Neil Armstrong To: kishon@ti.com, balbi@kernel.org, khilman@baylibre.com, martin.blumenstingl@googlemail.com Cc: Neil Armstrong , linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 05/14] usb: dwc3: meson-g12a: check return of dwc3_meson_g12a_usb_init Date: Thu, 26 Mar 2020 14:44:57 +0100 Message-Id: <20200326134507.4808-6-narmstrong@baylibre.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20200326134507.4808-1-narmstrong@baylibre.com> References: <20200326134507.4808-1-narmstrong@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The dwc3_meson_g12a_usb_init function can return an error, check it. Fixes: e3e716e6b889 ("usb: dwc3: Add Amlogic A1 DWC3 glue") Signed-off-by: Neil Armstrong --- drivers/usb/dwc3/dwc3-meson-g12a.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index 41bcbd31fe4e..69381c42a6d3 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -588,7 +588,9 @@ static int dwc3_meson_g12a_probe(struct platform_device *pdev) /* Get dr_mode */ priv->otg_mode = usb_get_dr_mode(dev); - dwc3_meson_g12a_usb_init(priv); + ret = dwc3_meson_g12a_usb_init(priv); + if (ret) + goto err_disable_clks; /* Init PHYs */ for (i = 0 ; i < PHY_COUNT ; ++i) { -- 2.22.0