From patchwork Sun Mar 21 18:59:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 1456313 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4F3RmX50yrz9sVb for ; Mon, 22 Mar 2021 06:01:00 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230163AbhCUTA1 (ORCPT ); Sun, 21 Mar 2021 15:00:27 -0400 Received: from mxout02.lancloud.ru ([45.84.86.82]:47302 "EHLO mxout02.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230182AbhCUTAA (ORCPT ); Sun, 21 Mar 2021 15:00:00 -0400 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout02.lancloud.ru 6FD9B205FD45 Received: from LanCloud Received: from LanCloud Received: from LanCloud Subject: [PATCH 4/4] pata_imx: deny IRQ0 From: Sergey Shtylyov To: Jens Axboe , , Shawn Guo , Sascha Hauer , "Pengutronix Kernel Team" , Fabio Estevam , "NXP Linux Team" , References: <2e552c36-84a5-a642-a8f0-1395f77a1a6a@omprussia.ru> Organization: Open Mobile Platform, LLC Message-ID: Date: Sun, 21 Mar 2021 21:59:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <2e552c36-84a5-a642-a8f0-1395f77a1a6a@omprussia.ru> Content-Language: en-US X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT01.lancloud.ru (fd00:f066::141) To LFEX1908.lancloud.ru (fd00:f066::208) Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org If platform_get_irq() returns IRQ0 (considered invalid according to Linus) the driver blithely passes it to ata_host_activate() that treats IRQ0 as a sign that libata should use polling and thus complains about non-NULL IRQ handler passed to it. Deny IRQ0 right away, returning -EINVAL from the probe() method... Fixes: e39c75cf3e04 ("ata: Add iMX pata support") Signed-off-by: Sergey Shtylyov --- drivers/ata/pata_imx.c | 2 ++ 1 file changed, 2 insertions(+) Index: linux-block/drivers/ata/pata_imx.c =================================================================== --- linux-block.orig/drivers/ata/pata_imx.c +++ linux-block/drivers/ata/pata_imx.c @@ -135,6 +135,8 @@ static int pata_imx_probe(struct platfor irq = platform_get_irq(pdev, 0); if (irq < 0) return irq; + if (!irq) + return -EINVAL; priv = devm_kzalloc(&pdev->dev, sizeof(struct pata_imx_priv), GFP_KERNEL);