Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964855AbbLGXXG (ORCPT ); Mon, 7 Dec 2015 18:23:06 -0500 Received: from mail-qg0-f65.google.com ([209.85.192.65]:36828 "EHLO mail-qg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932589AbbLGXXD (ORCPT ); Mon, 7 Dec 2015 18:23:03 -0500 From: "Geyslan G. Bem" To: peter.senna@gmail.com Cc: "Geyslan G. Bem" , Mathias Nyman , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] usb: host: iounmap before return Date: Mon, 7 Dec 2015 20:07:05 -0300 Message-Id: <1449530563-23307-1-git-send-email-geyslan@gmail.com> X-Mailer: git-send-email 2.6.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1123 Lines: 39 This patch fixes a 'quirk_usb_handoff_xhci()' branch return that was not unmapping correctly. Coccinelle: scripts/coccinelle/free/iounmap.cocci Signed-off-by: Geyslan G. Bem --- drivers/usb/host/pci-quirks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 26cb8c8..ee4426b 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -992,7 +992,7 @@ static void quirk_usb_handoff_xhci(struct pci_dev *pdev) if ((ext_cap_offset + sizeof(val)) > len) { /* We're reading garbage from the controller */ dev_warn(&pdev->dev, "xHCI controller failing to respond"); - return; + goto out; } val = readl(base + ext_cap_offset); @@ -1055,6 +1055,7 @@ hc_init: XHCI_MAX_HALT_USEC, val); } + out: iounmap(base); } -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/