Received: by 10.223.185.116 with SMTP id b49csp139190wrg; Thu, 8 Mar 2018 14:22:52 -0800 (PST) X-Google-Smtp-Source: AG47ELtYilrcwY27ns2v7LZ4rwvgWG+bfvnxD1/cMQis2jmrLLTb8RYGeEDmtsDmL2At860wBn3r X-Received: by 2002:a17:902:3084:: with SMTP id v4-v6mr25015399plb.102.1520547772547; Thu, 08 Mar 2018 14:22:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520547772; cv=none; d=google.com; s=arc-20160816; b=hzVfMDcf65HXkLuA93lnGkb9edhqmuthgUuuf9UoIZuwrHkUiv/5bKUwGhN4PG21N1 PE0s1UgtXrklTX8b22tgUqRhMPtwol/c5bG8G2Bsp7lOrCWYfRfY3YmKfDotqFEAobpI 2Qgy1joz/YGj+Mqn/hLYLJnsUI+H2+fHsF5e0/H26cy1MwH0RHr3NLjSHpdy6J9OyFRr c6AjtGXyUjdqGstYmMBdr58P575dW/oUYmaDNfsxzvsReEKsZsFTWWOyvdklA6QzAu9c QM4wMeJro75PIDoJicyjyA2ZaaO0IA/F5IFZk8x5e7Lap4TB72D+mFZ0eF9oYqCsOtrj w/1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=CMl67woWNcwynZ+8PbILmkKHl2g8ByC2BGxc72xeaH4=; b=h/rvZIFScIqXvyETMa37/gLkMJSqjfPDQ5ofa8Tbv1ydNkWV7VCF2BGRSTK5u2ZpNY z9YUDUGtCWb9G+wEqukhninf/TkNzpxpTshGzyA4bD05ZYnYgnXFYOY43lXCbuUFQiET IRtsSRv8KcnDwzXfrmB+qEPVwN7agOMsVjJDy47RVvd0+AWhVbaZ8MJMkq+i3NC8lfqw ky24Q/6+tsiN2E8W0TwPzlSDn3fFdUv9pMyfTlkdMS9hhjVR1swZ5wsNRpTgaHH4EicN Yx/iNgAHwKU9jpbCQKjwJmQo5K8BEYLsyhCDZJHhdGHuDI+9YF5zSCeibFAzu+m5ODNV +PBw== 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 m1si5766166pgc.757.2018.03.08.14.22.37; Thu, 08 Mar 2018 14:22:52 -0800 (PST) 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 S1750948AbeCHWUP (ORCPT + 99 others); Thu, 8 Mar 2018 17:20:15 -0500 Received: from nala.villavu.com ([188.165.243.101]:53430 "EHLO nala.villavu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750713AbeCHWUO (ORCPT ); Thu, 8 Mar 2018 17:20:14 -0500 Received: from a82-161-36-93.adsl.xs4all.nl ([82.161.36.93] helo=chrometwo.fritz.box) by nala.villavu.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1eu3tU-0007CN-6T; Thu, 08 Mar 2018 23:20:12 +0100 From: Merlijn Wajer To: b-liu@ti.com Cc: merlijn@wizzup.org, ivo.g.dimitrov.75@gmail.com, linux-omap@vger.kernel.org, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] usb: musb: Fix external abort in musb_remove on omap2430 Date: Thu, 8 Mar 2018 23:19:48 +0100 Message-Id: <20180308221949.12054-1-merlijn@wizzup.org> X-Mailer: git-send-email 2.16.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This fixes an oops on unbind / module unload (on the musb omap2430 platform). musb_remove function now calls musb_platform_exit before disabling runtime pm. Signed-off-by: Merlijn Wajer --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index e2e95071328a..fb1d88183ea1 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2474,11 +2474,11 @@ static int musb_remove(struct platform_device *pdev) musb_disable_interrupts(musb); musb_writeb(musb->mregs, MUSB_DEVCTL, 0); spin_unlock_irqrestore(&musb->lock, flags); + musb_platform_exit(musb); pm_runtime_dont_use_autosuspend(musb->controller); pm_runtime_put_sync(musb->controller); pm_runtime_disable(musb->controller); - musb_platform_exit(musb); musb_phy_callback = NULL; if (musb->dma_controller) musb_dma_controller_destroy(musb->dma_controller); -- 2.16.2