From patchwork Tue Mar 7 17:30:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 13164275 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 94E55C6FD1F for ; Tue, 7 Mar 2023 17:32:15 +0000 (UTC) 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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rg8lFvUS4LMgZEa8PMI/ygtenaT7Op2PIZL6mJoHquY=; b=rXWkzo0RQ2QRZI TePNUhKC+gmNcDaX+ETTE2KuLmi7OHFAPmy+X76pYGnoZK7TGsX1oBIeqDqb1qJ/pBuYacWmg50DD oqP3r1eXbq/sQpVuNl9eZE19xxBUES3+xlI3gfwjSqTH7PqTqvCDpg2J886dQVTAmB5VXv1NteJUE VeC5TsAM9ycOKfB3A20UBkzBSZu94AG1k9DsDk1eIl92NpmDsr8IP6CQYFfRoFMbcjdZhBXmgezNr /jooo9fmv/AXugEUgO65zNJrXiERcLwhjYoROLS6pV3sxA8z2OUAPeMUQGl5PLPuWjNJEDGiWZEry X6SOkVc1c7G0naGWgDyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZb9k-001nzA-86; Tue, 07 Mar 2023 17:31:20 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZb9T-001nra-C3 for linux-arm-kernel@lists.infradead.org; Tue, 07 Mar 2023 17:31:07 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 327HUvK4004926; Tue, 7 Mar 2023 11:30:57 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1678210257; bh=Ps8FiHY1KWT4BUFmpIbJrNMt544kBMXkEtn2e1pvBwY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=UJ+ApJhCfdg0NNpxpd/ePso6l2Do5SaJk+BrkVjhONx9etsQDQ7CjaC+WrQS/lUQp uD+Er61KWS3SSu4kjAqIKs8KfvvHEnxeHIbUXIEV+W4GoX0ZP3Ps6eQ4dBDPFAkCFI rYiihiUFmPUUQ6QwFqcJsFXKEdT/4dv7VkjFkI0Y= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 327HUvLS094405 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 7 Mar 2023 11:30:57 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 7 Mar 2023 11:30:56 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 7 Mar 2023 11:30:56 -0600 Received: from ula0226330.dal.design.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 327HUuUB045064; Tue, 7 Mar 2023 11:30:56 -0600 From: Andrew Davis To: Wolfram Sang , Bartosz Golaszewski CC: , , , Andrew Davis Subject: [PATCH 3/3] i2c: davinci: Do not check for IRQ number 0 Date: Tue, 7 Mar 2023 11:30:56 -0600 Message-ID: <20230307173056.30164-3-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307173056.30164-1-afd@ti.com> References: <20230307173056.30164-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230307_093103_493577_C0999D88 X-CRM114-Status: GOOD ( 11.88 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is not a valid IRQ number and will not be returned, no need to check for this. Signed-off-by: Andrew Davis --- drivers/i2c/busses/i2c-davinci.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 4a8e7728ee29..135f76593e6f 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -764,11 +764,8 @@ static int davinci_i2c_probe(struct platform_device *pdev) int r, irq; irq = platform_get_irq(pdev, 0); - if (irq <= 0) { - if (!irq) - irq = -ENXIO; + if (irq < 0) return dev_err_probe(&pdev->dev, irq, "can't get irq resource\n"); - } dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); if (!dev)