Received: by 10.223.164.202 with SMTP id h10csp886106wrb; Thu, 23 Nov 2017 07:47:31 -0800 (PST) X-Google-Smtp-Source: AGs4zMbMtDYtxwlcbvmuSqroxtP/DY6lzS9Adt0rDS4NdcUPDmWKRRGon4r7p1x+cpD+QRwqpSMR X-Received: by 10.159.195.12 with SMTP id bd12mr8032288plb.14.1511452051695; Thu, 23 Nov 2017 07:47:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511452051; cv=none; d=google.com; s=arc-20160816; b=r2S+5stNJPEsLphyt7MAzAXLWYBeRoLflkE4Y6pVyxDftE9IcYNeP1qQPMSRd30zZH cEFj99zV6o9XGQPIHnKIpRx+IUpGWYx+gNCjeXhr3YATQAh4JNGcEoyPwEqHtYkbWw47 mpHsJ1MK+YUscDQmxvMvsIMQbDDfAMitf0rp0PD/TnWl70RQTocUODX0cvUT/VibowSm Zes/E99qvtxgIpgbdf3pk0NliO+NYPUA34rbHRFrAxjFadFZnEwuGa32EL6veJDh8Qj7 tgGgpiib9XuQeNDvDbRrAm/iK9VdwnY6C5VaIEJs9UnYCpPy2KZydvfQkfJXQJaNWS1j 94yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=tlLmODJWqmLbPug9p7noCXbfyxIX1fEVmWo6/i0Gf34=; b=R8WHB6FUs4fpT7oysBJTOK6B+xWfZ6fIwxxh0HPRv4C5goVGxKstT3L62OHwFncqX+ EvHOEhR4BrpAqCcPS6IHYeb8+hqorOX550zaQPgFkLaTcJkD1KDcI9EtFTe+FHOKfowZ ze2VDK4cVDxK2T9PCdrDrOZed7RPhVZ9+gpTh7x4/M7hqvZDgPj6IsfitkOGt9PqDUNg jPA3pIp4hflP7MSNlLO0CPAUKGmpO4DXnNmH1l94ClGoJakExL4al/efCGx+1+8plg6x FnEKRKYt8z+l0R3eNfk9eVGFsme1yyts8VO8670jA+FsVP3DTSgSr7qDZZr903md/Nj4 t4Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RLjh3IZi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8si6270512pfh.382.2017.11.23.07.47.19; Thu, 23 Nov 2017 07:47:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RLjh3IZi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752985AbdKWPpZ (ORCPT + 76 others); Thu, 23 Nov 2017 10:45:25 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:36873 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752493AbdKWPpY (ORCPT ); Thu, 23 Nov 2017 10:45:24 -0500 Received: by mail-pl0-f67.google.com with SMTP id 61so2866835plf.4 for ; Thu, 23 Nov 2017 07:45:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=tlLmODJWqmLbPug9p7noCXbfyxIX1fEVmWo6/i0Gf34=; b=RLjh3IZigOzTzH0QBNjik7htbRa3+L3NDXWA5JxelTBM32hUgjrsY4g5HHUkjT16Vo w0FxD2nZ1QYeh7IhJXqIcmhFeVHvVV8BhLYlwH/cVpzRXD8TPqQQWO0E0YDxpArnslcx UT0mNtXKbE90bTIC0U1MjCYZJ9r7uaY7hJX+l/XND9ZVuxgoM309Pxo70/z1ChRZKnig Igk3SMmpzUoXvA6E7CT9QZSA4FvTUkE1ALZG0OUPsJXk73cYAwAAy+u30IKLC3Ox5+kX VbwpX5qxe8Bu3fLj8KS3Vgh3zvPm7dmo1tZoBrOVnV2Zg2imgIoGBUuJDPXZtsaRavk/ rmgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=tlLmODJWqmLbPug9p7noCXbfyxIX1fEVmWo6/i0Gf34=; b=rkXF+Mang7pDgl7mgpuoLYeROjUj+5meT1Q3Z9exVFewEsWsm1zdcDAkOhQrpfsIhs 3AcI3EnYPse9kAH/j88uPr4/uRR0JaNfZglMXOoZ/sXRwB6tuR/+EBzx1qedI1diV25F twwA7QkDSFku47rkhUyP33U+3tYMzFsKL9lrqAgT1Ebj7xUFnscgni7+PWdfzxoOmBcV RZUctmFi6ZqJysFT3rPve/IJnMedx2aD0lqxIOVUnPZ6ZeRj4dh7NsebDXYcNS/Xb9Ds bcLp0Ue4UysGuoBVtLldIpWyfzhlfUbE5U+tY/NeMvb5KDcVQGND5gKsxzPsafgE5wd9 LEXQ== X-Gm-Message-State: AJaThX6XDGMn4bv0oar7HyzWA9zSlJMjErdwgH7M7dx6iXw5FEZw8Xyk upc3ovNO2JVWe5CPI8O1rIg= X-Received: by 10.159.216.131 with SMTP id s3mr25047652plp.434.1511451924259; Thu, 23 Nov 2017 07:45:24 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id o123sm33715716pfb.102.2017.11.23.07.45.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Nov 2017 07:45:23 -0800 (PST) From: Arvind Yadav To: john@phrozen.org, ralf@linux-mips.org Cc: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org Subject: [PATCH v2] MIPS: ralink: Fix platform_get_irq's error checking Date: Thu, 23 Nov 2017 21:15:10 +0530 Message-Id: <4b30004af37521b2102a4eda7c15f7257437ac85.1511451615.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The platform_get_irq() function returns negative if an error occurs. zero or positive number on success. platform_get_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav --- changes in v2: Subject spelling was not correct. change FIX in place of 'ix'. arch/mips/ralink/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/ralink/timer.c b/arch/mips/ralink/timer.c index d4469b2..913dc84b 100644 --- a/arch/mips/ralink/timer.c +++ b/arch/mips/ralink/timer.c @@ -109,7 +109,7 @@ static int rt_timer_probe(struct platform_device *pdev) } rt->irq = platform_get_irq(pdev, 0); - if (!rt->irq) { + if (rt->irq < 0) { dev_err(&pdev->dev, "failed to load irq\n"); return -ENOENT; } -- 2.7.4 From 1586263558283258911@xxx Sat Dec 09 00:20:14 +0000 2017 X-GM-THRID: 1579806959198095769 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread