Received: by 10.223.164.202 with SMTP id h10csp1440143wrb; Thu, 23 Nov 2017 18:11:30 -0800 (PST) X-Google-Smtp-Source: AGs4zMbBQqJcZJW2WnQGFnXOpEWUDtPTCFp2+ilVWBBGYPbLoLstzPO47ZLH9HMfCYh3S3rohk+V X-Received: by 10.99.124.85 with SMTP id l21mr26133807pgn.85.1511489490146; Thu, 23 Nov 2017 18:11:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511489490; cv=none; d=google.com; s=arc-20160816; b=zLOjQX8lotPNDgVZXJJze5Ssw9W0F6+6HPNSuKANmMSZiBMY95GDReSgw4SXDG5ZPG QTunFknjqBdoMDarYvwz0gOTvptScltEi24Q/VF1n+IgEPLw8y2dHuyT+KSDd3UMPRTk xOPal/DOMj98uqa3y8CLsF55ORtfrQWdYiGmfmf2xIaF4wmd0yMZ18zBpRZqnN31L/Lu naunbLhSiefvc683pUj+vKCk1cIJpXhjzyePxJHRPqTqWi3vCcd0JrbM7F1dlkRz92gu 8cy6+IbWPhGSgfyhvNqhDkbKMvCtFO7ahem9xgNOHk1BrKN4sQn0c+f78UYfZYPRaQGh 3FuA== 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=6DEPr4nhganPYVgOtBdyAtKjZii999Lf1GixBf0Js8s=; b=IeGcF3nClK6m/omb9gDovhSWZk4H6zIe61QtQL2gNCaNFASblLPN1yRB8oGBv7EbXF dnT4EP5FKGtZC9Dzug9RAtRSqSspzBlZLIXMBwReHI13JFkkRDvrepJLzW2SCX0jU7r8 BlxNPfEMKjwQtahcC+4xX7Ppl2gZvvMD7fhjXEFIINL5LuhvvOBM3iXSqSnJustV6POR 2L/c+7MHMXvUms75P51pHwFbeTkygR+zQ9ltN1OwDBGHI0Fiv439sYBnCj7+UjxbmdYC oQ6d4NKmqMFYIU4QN8x1qIdsn3lWj5USzsqWRsNlQZ66MexFlfP4kVtBxkUhNPoS7LE7 71iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L1Ir62/n; 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 z19si17031153pgn.381.2017.11.23.18.11.19; Thu, 23 Nov 2017 18:11:30 -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=L1Ir62/n; 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 S1751942AbdKXCKk (ORCPT + 74 others); Thu, 23 Nov 2017 21:10:40 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33456 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751566AbdKXCKj (ORCPT ); Thu, 23 Nov 2017 21:10:39 -0500 Received: by mail-pf0-f195.google.com with SMTP id a84so14184870pfl.0 for ; Thu, 23 Nov 2017 18:10:39 -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=6DEPr4nhganPYVgOtBdyAtKjZii999Lf1GixBf0Js8s=; b=L1Ir62/nLUMktUok1B/k+KHKFfO8OfN1Ta7+Wf1utaB6KvGtosf6nRV7GWHvemKohz ESTGNbsA3/ITiJsQU7E/I0kMDnBQ7sFiAtId1BHxcEhw5T9a4qRL+ZDcKve89EJ6Tbux plyDA0rD6Z+u14L4reOLTEW77GWWidNVKBLBQcGuIr9qfPd3CJ+9DYT8jOLuWU90oucj JJCqNfgpFmU9tqI5QtjWkCTRXEUv3OlrZ6NbLTnRfyvUluJ80UdAIykQDuNdB91f4KUr Z1z9omDHyj32MGNK2fF3THQRYmrjFD99skkr0v3a1//5OWSqYuyGBvox0p3R7VwCt0Bs Zk8g== 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=6DEPr4nhganPYVgOtBdyAtKjZii999Lf1GixBf0Js8s=; b=nI3T10Va4hF6ktqzaz25+a4pmiJt/DcbU7YyEWNuB+PrZ8rv7kcIouWikDdGgTPL+A 5PKdMhQNbXGJoXBfdzEQX005RyKhFqw7sUi/52olivb0q7ngDtwbRLukJLPHSZmpcE3H 0+wnpsU55E3v6bIiH4HHti1CvFx6247HxJNWDebFwT1iSkbASykIfuhZhHYyGQcBV+Bf x6706/oADNP80nRdcftHrDdNAjJQi1ASAN/949ocn+5jguySR5TJmQeWcFYPcBhra98m 3LLDwYxXlu/Ofy6EPgSHSbxICllWfvPprl6q3A41/VG7hOVqR2Kro8UXKbvhkHGU6j5l zoTg== X-Gm-Message-State: AJaThX41URtRimyAmGAOXRTyzdLQDQlTuuXnawusG6yscet4fvKiC2aB n8TdWBRNlGTFGvQR655WhQY= X-Received: by 10.99.121.140 with SMTP id u134mr25479518pgc.16.1511489439099; Thu, 23 Nov 2017 18:10:39 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id i187sm36607844pfc.96.2017.11.23.18.10.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Nov 2017 18:10:38 -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 v3] MIPS: ralink: Fix platform_get_irq's error checking Date: Fri, 24 Nov 2017 07:40:30 +0530 Message-Id: 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'. changes in v3: Return rt->irq instead of -ENOENT. arch/mips/ralink/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/ralink/timer.c b/arch/mips/ralink/timer.c index d4469b2..4f46a45 100644 --- a/arch/mips/ralink/timer.c +++ b/arch/mips/ralink/timer.c @@ -109,9 +109,9 @@ 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; + return rt->irq; } rt->membase = devm_ioremap_resource(&pdev->dev, res); -- 2.7.4 From 1584911488812586047@xxx Fri Nov 24 02:09:40 +0000 2017 X-GM-THRID: 1584911488812586047 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread