From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EBAAC433F5 for ; Mon, 18 Oct 2021 18:41:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0C8B260F93 for ; Mon, 18 Oct 2021 18:41:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0C8B260F93 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=omp.ru Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4/KRcK0qlHLGH6/y8k8nYM0g85umBpfIzDkEu7EDX14=; b=jD26/NnW8isb0k xs9ec8Vq0ekisv0Q8QRsOYl6v/ucTQ0qnoVIzvaD/ex7LeQ0JakKP/AhohVN+NwnMJ4iI4mIdlsis QFSoALGycXkN+5zqdihQSibc2fENmJKr52/wT1/5WRhlt0ignQGXarRrInMmRAju45z4G7vK4rRvi BXFK4z1Phg8bJUGuKx8ealUxyJ33Ni8w4Qo0OoxYzYijwp2gEX4Lix5VI1K3fliub0Bju5pYo5++s B4olLQeYCBipXE7BGsESCSViYFszNrf8xcpnwNO+2CTVY9pzWZRGccLWXtI0LOz0Tc40KYwCJmRPt WrsDQyfYy+941wCJiRpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcXYD-00GnUL-KV; Mon, 18 Oct 2021 18:39:57 +0000 Received: from mxout02.lancloud.ru ([45.84.86.82]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcXXy-00GnMm-W9 for linux-arm-kernel@lists.infradead.org; Mon, 18 Oct 2021 18:39:45 +0000 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout02.lancloud.ru 64E892072127 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: , Alan Stern , "Greg Kroah-Hartman" Subject: [PATCH 08/22] usb: host: ohci-at91: deny IRQ0 Date: Mon, 18 Oct 2021 21:39:16 +0300 Message-ID: <20211018183930.8448-9-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211018183930.8448-1-s.shtylyov@omp.ru> References: <20211018183930.8448-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT01.lancloud.ru (fd00:f066::141) To LFEX1907.lancloud.ru (fd00:f066::207) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211018_113943_232901_94ABD8EB X-CRM114-Status: UNSURE ( 9.77 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Ludovic Desroches , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org If platform_get_irq() returns IRQ0 (considered invalid according to Linus) the driver blithely passes it to usb_add_hcd() that treats IRQ0 as no IRQ at all. Deny IRQ0 right away, returning -EINVAL from the probe() method... Fixes: fb5f1834c322 ("usb: ohci-at91: fix irq and iomem resource retrieval") Signed-off-by: Sergey Shtylyov --- drivers/usb/host/ohci-at91.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index a24aea3d2759..6a7276a730d1 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -181,6 +181,8 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver, dev_dbg(dev, "hcd probe: missing irq resource\n"); return irq; } + if (!irq) + return -EINVAL; hcd = usb_create_hcd(driver, dev, "at91"); if (!hcd) -- 2.26.3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel