From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753015AbcFJKFq (ORCPT ); Fri, 10 Jun 2016 06:05:46 -0400 Received: from mga03.intel.com ([134.134.136.65]:5381 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752111AbcFJKFp (ORCPT ); Fri, 10 Jun 2016 06:05:45 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,449,1459839600"; d="asc'?scan'208";a="984746026" From: Felipe Balbi To: Roger Quadros , grygorii.strashko@ti.com Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: dwc3: fix runtime PM in error path In-Reply-To: <575A8DE2.70505@ti.com> References: <1465548878-30085-1-git-send-email-rogerq@ti.com> <87eg85769o.fsf@linux.intel.com> <575A8DE2.70505@ti.com> User-Agent: Notmuch/0.22+11~g124a67e (http://notmuchmail.org) Emacs/25.0.93.2 (x86_64-pc-linux-gnu) Date: Fri, 10 Jun 2016 13:05:25 +0300 Message-ID: <8737ol740q.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Roger Quadros writes: > [ Unknown signature status ] > On 10/06/16 12:16, Felipe Balbi wrote: >>=20 >> Hi, >>=20 >> Roger Quadros writes: >>> If there is a failure after pm_runtime_enable/get_sync() >>> we need to call pm_runtime_disable/put_sync(). >>> >>> Otherwise it will lead to an unbalanced pm_runtime_enable() on the >>> subsequent probe if the earlier probe bailed out due to -EPROBE_DEFER. >>> >>> Signed-off-by: Roger Quadros >>=20 >> where is this supposed to be applied? You're not checking if > > On your testing/next > >> pm_runtime_get() failed at all. >>=20 > > I'm not adding pm_runtime_get in my patch. > Just fixing up the failure path in core.c. that's fine, but you're missing this hunk: =2D pm_runtime_get_sync(dev); + + ret =3D pm_runtime_get_sync(dev); + if (ret < 0) + goto err1; + pm_runtime_forbid(dev); =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXWpDlAAoJEIaOsuA1yqREFw0P/ir7A81wuBdsM3gkZ6ak7STR KGw4CanG4WqRYqBIzDW3L6oeuHgjedTGsp7XQ/EIpAld+mlU/RAr6g5tIZJcYhte 7blCQEZzaJCGo3Wlun8w5Q5E+3trpyIfG4TqL4kkFUDsrpvxwLWQdjZhs/B7R0Uc /0iICWZWnzZrarTcGsA88URvFHXu3hwS0CY4osdGZLNmUIBlL7FDds33m4MkYmIl wcdmfuRewa07WSpFW7h80t1Nv2JnUw57hy3C8BsbLNqgdvRgl2elnTEvd9lqBclb bxCcfi6OAA/ctuJuZW6z2cwTbiN2Mvuvz06VbYvm8xa3XZUtEZmTLw0oiuh4QVU2 sWX0X2E3HAygYnNezKXh+zTwopHSyYtol7xulcFF5oMLemfUguaXiHHwq307Jo7I bkJZatsL1kJFpH4kXLgQ2anbvsRCyG/jJsIW11guFIaQ6QlTkj3BRlu4PyL1JxyM lVCLrftiGkt6Wg9HuCciBVvEDhAOuFTQQv0aLeRwSVXdN/iHTzALlHGACCJIfAWm Q9zM1oJamMblxAn+CKQh8d5680gqxG6SOcdgz8RZtQtSX8Kh0O9o+y3lPKmcXCC+ A0fqSpKj+Zu9NAFJJgSmljOs+6vm1k2qhkF3JZxUQR8oh8bdmemg1SuRSRygaL0U eU7Lms8u4P5mtdiygNIp =eszD -----END PGP SIGNATURE----- --=-=-=--