Message ID | 20200310123622.817577268@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <SRS0=QSPG=43=vger.kernel.org=stable-owner@kernel.org> 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 A7EA2C10F27 for <stable@archiver.kernel.org>; Tue, 10 Mar 2020 13:34:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7DA6120675 for <stable@archiver.kernel.org>; Tue, 10 Mar 2020 13:34:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583847265; bh=aQyOo51tJXpfdWYbk8rtLOh1ur5fSsFP40lAEGRT9CI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=wCkU/0EFvlegQYRMPOe1TXZQ634/nWrqfUfiCeV2fIXIwlUGgRTrSdOuTOl3ShCms Y3hserWtNgng61P66J2+cknIRGtcGOZrv2tG2nDFBeQnac8ZwnjHQvUhWWl7SCaXPM MVyNSLZrmNxDWsRvPg2DgVQV9ffqtN2n2gQokmY0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727697AbgCJMqo (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 10 Mar 2020 08:46:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:50092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726548AbgCJMqn (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 10 Mar 2020 08:46:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 F128F20674; Tue, 10 Mar 2020 12:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583844402; bh=aQyOo51tJXpfdWYbk8rtLOh1ur5fSsFP40lAEGRT9CI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2UH33dAb3vxB8u4Fsi8qtzed+lbimkOqDvJG7beaPPsqB2VtmTvAXmhPYosCRwmPq xntWw6rvwlHCeuNo0dluJvzug++g7R13qtMBYPldZKN0xvM92/rFIHLxihlQ1BP4/w YkQzLcDvHkmE8wnFFcQfF4hF2//WgbCgW/oq2fNE= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Alan Stern <stern@rowland.harvard.edu>, Eugeniu Rosca <erosca@de.adit-jv.com> Subject: [PATCH 4.9 67/88] usb: core: port: do error out if usb_autopm_get_interface() fails Date: Tue, 10 Mar 2020 13:39:15 +0100 Message-Id: <20200310123622.817577268@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200310123606.543939933@linuxfoundation.org> References: <20200310123606.543939933@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c @@ -179,7 +179,10 @@ static int usb_port_runtime_resume(struc if (!port_dev->is_superspeed && peer) pm_runtime_get_sync(&peer->dev); - usb_autopm_get_interface(intf); + retval = usb_autopm_get_interface(intf); + if (retval < 0) + return retval; + retval = usb_hub_set_port_power(hdev, hub, port1, true); msleep(hub_power_on_good_delay(hub)); if (udev && !retval) { @@ -232,7 +235,10 @@ static int usb_port_runtime_suspend(stru if (usb_port_block_power_off) return -EBUSY; - usb_autopm_get_interface(intf); + retval = usb_autopm_get_interface(intf); + if (retval < 0) + return retval; + retval = usb_hub_set_port_power(hdev, hub, port1, false); usb_clear_port_feature(hdev, port1, USB_PORT_FEAT_C_CONNECTION); if (!port_dev->is_superspeed)