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: 660240 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3661C678D5 for ; Tue, 7 Mar 2023 17:35:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231795AbjCGRfW (ORCPT ); Tue, 7 Mar 2023 12:35:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231883AbjCGRfE (ORCPT ); Tue, 7 Mar 2023 12:35:04 -0500 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62661A2F1E; Tue, 7 Mar 2023 09:31:08 -0800 (PST) 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 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.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)