Received: by 10.213.65.68 with SMTP id h4csp1289305imn; Mon, 26 Mar 2018 04:52:28 -0700 (PDT) X-Google-Smtp-Source: AG47ELvzL0zAr9JNxgVi014Cwo2soNZrqcI8VZs21WhzPI6VoXIfOc4u/wJEyn+yz0VLWX9FXjCX X-Received: by 10.98.190.26 with SMTP id l26mr32835271pff.62.1522065147997; Mon, 26 Mar 2018 04:52:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522065147; cv=none; d=google.com; s=arc-20160816; b=Weeh7O1VkFnIaIt51c8Aj0Gm4gCVUUB4Rc7OAvsVZZRyN75crv3HWda/e2pltN3iCo SK6gUfVIO4oo+pNRPmMx7ETKWYqdpKHvw4uMyUECdo8mfYhb4pkuDmABWjOuffzgUTqF KzCOqlQMdOLS3G7VcAl9bwQ19fmFwXX8IaqKtFwVUCsc8tw2Lnyj320U0TD9N+Ims2v/ goop8/4uwSCQ20Z5kmd1zQebw136OZFaBfYWyZsorLwqPwgLckuBd0oFoiboE5sLiAeD GgndbTTcWFkNH3yw29+QDC6/6Cwo6zxwstoVW+hiD6XRocCtM5Q3H6vl02TtBR1Nh5Tn DRRg== 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 :arc-authentication-results; bh=tSBDlDUVkLJq3V8ttEBEfempXHfcxSoUK172JPAOBiM=; b=lzdwXQwnLZpGJLQzdzPVEZVY1VvXqGBrj54QV1HcUS5celBVSpjjvbVzZblCJSljOj 9ySZ/W4AXMpyaY0ulXcQCsIhLL96eeND0622fn5+pFuQf248mbf81BxFf4Qv6ZA4/QVt 9NyXy1c70I1Il+WczHgCUOnIqbOlkPma6kScEwWhQfgV7m7WTCyt9weQ+tdqXJJgEicD j0r/1380TGp4r1ed3+vCi54xWN5+9x9CGz4UHAIUf60zec4clNAurmQuevKkXnqPlBvD 2P8IeE9Jpq318J9AoMeT0QwHgNRVk6NIC8HLGQJx/SK/exjgHwPVz3zMVR5dHyC1MWxI gjBA== ARC-Authentication-Results: i=1; mx.google.com; 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 m10si10223233pgs.523.2018.03.26.04.52.13; Mon, 26 Mar 2018 04:52:27 -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; 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 S1751489AbeCZLvO convert rfc822-to-8bit (ORCPT + 99 others); Mon, 26 Mar 2018 07:51:14 -0400 Received: from gloria.sntech.de ([95.129.55.99]:52494 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751109AbeCZLvN (ORCPT ); Mon, 26 Mar 2018 07:51:13 -0400 Received: from ip92342381.dynamic.kabel-deutschland.de ([146.52.35.129] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.1:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1f0QeY-0000M7-GN; Mon, 26 Mar 2018 13:51:06 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Tomeu Vizoso Cc: linux-kernel@vger.kernel.org, Felipe Balbi , Amelie Delaunay , Minas Harutyunyan , Greg Kroah-Hartman , linux-usb@vger.kernel.org Subject: Re: [PATCH v4] usb: dwc2: dwc2_vbus_supply_init: fix error check Date: Mon, 26 Mar 2018 13:51:05 +0200 Message-ID: <2158461.zz8sS7CZ86@diego> In-Reply-To: <20180326090001.57627-1-tomeu.vizoso@collabora.com> References: <20180322093943.49717-1-tomeu.vizoso@collabora.com> <20180326090001.57627-1-tomeu.vizoso@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Montag, 26. M?rz 2018, 11:00:01 CEST schrieb Tomeu Vizoso: > devm_regulator_get_optional returns -ENODEV if the regulator isn't > there, so if that's the case we have to make sure not to leave -ENODEV > in the regulator pointer. > > Also, make sure we return 0 in that case, but correctly propagate any > other errors. Also propagate the error from _dwc2_hcd_start. > > Fixes: 531ef5ebea96 ("usb: dwc2: add support for host mode external vbus > supply") Cc: Amelie Delaunay > Signed-off-by: Tomeu Vizoso Reviewed-by: Heiko Stuebner