From patchwork Tue Nov 5 08:41:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 11227157 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 40F041850 for ; Tue, 5 Nov 2019 08:42:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15E4E214D8 for ; Tue, 5 Nov 2019 08:42:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572943342; bh=fBCY4G/lx19J4B3zugjQxlH5ahHSyhJeif2aiPLh+fI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=DrvfwR4dSr9Z9XKysJ+kog8u2Zjvanzx52aSOGMWjm8dmgkk+og/8TkwQvnMbYi/T RXvZxTiOPn1Zj9uJuLtY2MPUuuKF25W7VkQTCXUL2oM/V/o50dQkA99Y4Q5qQ/+BZ0 jMeYhP96b44EH3PqbAedEKR3j/R3ZybjLJw27YyA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730545AbfKEImV (ORCPT ); Tue, 5 Nov 2019 03:42:21 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45330 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730216AbfKEImV (ORCPT ); Tue, 5 Nov 2019 03:42:21 -0500 Received: by mail-lf1-f66.google.com with SMTP id v8so14405148lfa.12 for ; Tue, 05 Nov 2019 00:42:19 -0800 (PST) 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=afgTwGT7brsAeSuOhWRZ7IqDVxGWSNG4jsxiRPhaQaE=; b=QAq6lsEriyCxG5sZ+g4sguFSiIbckvgL91HeiPNQIBVWVKGI1JEoBoPj50PCvoY4+7 F4YWlWyYTEAT6oqerGs707Xe6S1FokI27cpL1xM7GKEeSDMUeCFTFgfRhfbHXN2e+G4Z 3TSqN6SjP2CDcmNeEFMOYNtrgSV40AqfwbLo1/7UzyP82YXatZS/fwB3iz+P5MvhCYGx k6O19VHxHhpLw0+87TJHUZtmkI/uf3ttnPBR9Gr01MBMrgQLiYugmv+mORGxzjjz3BKL +URprfNalgzm9AJNg4YN0vr+n3QFiwqomshtK1kEdYCeRUBLWuueWxJGONqSDJ+jR2dC 5Oog== X-Gm-Message-State: APjAAAU5m2zfIRSgF/vgmX/uNQa7WbkxauqsIiA6B3EkIxpfpzpBON9N CL7jy9qIlo0hm46xN3q4UuM= X-Google-Smtp-Source: APXvYqz6voU62owE/+PeCh7//o9mb3l6X8QWXCzgYNJwXxxh+IiFGiA9+k55ftLmaPqgrjx+zLe2Yw== X-Received: by 2002:a19:c6d6:: with SMTP id w205mr18235575lff.17.1572943338396; Tue, 05 Nov 2019 00:42:18 -0800 (PST) Received: from xi.terra (c-51f1e055.07-184-6d6c6d4.bbcust.telenor.se. [85.224.241.81]) by smtp.gmail.com with ESMTPSA id r9sm798017ljm.7.2019.11.05.00.42.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2019 00:42:16 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.92.3) (envelope-from ) id 1iRuPl-0004H3-QJ; Tue, 05 Nov 2019 09:42:13 +0100 From: Johan Hovold To: Greg Kroah-Hartman Cc: Juergen Stuber , legousb-devel@lists.sourceforge.net, linux-usb@vger.kernel.org, Johan Hovold Subject: [PATCH 07/14] USB: legousbtower: stop interrupt-out URB unconditionally Date: Tue, 5 Nov 2019 09:41:45 +0100 Message-Id: <20191105084152.16322-8-johan@kernel.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191105084152.16322-1-johan@kernel.org> References: <20191105084152.16322-1-johan@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Stop also the interrupt-out URB unconditionally in tower_abort_transfers() which is called from release() (for connected devices). Calling usb_kill_urb() for an idle URB is perfectly fine. Signed-off-by: Johan Hovold --- drivers/usb/misc/legousbtower.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c index 33533faa019e..3e409dfe172c 100644 --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c @@ -448,8 +448,7 @@ static void tower_abort_transfers (struct lego_usb_tower *dev) { /* shutdown transfer */ usb_kill_urb(dev->interrupt_in_urb); - if (dev->interrupt_out_busy) - usb_kill_urb(dev->interrupt_out_urb); + usb_kill_urb(dev->interrupt_out_urb); }