Received: by 10.223.164.202 with SMTP id h10csp876702wrb; Thu, 23 Nov 2017 07:37:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMarYXV9z7ZTPmLxxO+4PdjS47g63SSUySSAZ8XpQEr43Qg/p1w9lYbvfvVncT9C+r6oJcWE X-Received: by 10.99.182.2 with SMTP id j2mr2298649pgf.116.1511451455302; Thu, 23 Nov 2017 07:37:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511451455; cv=none; d=google.com; s=arc-20160816; b=zJNbf/D1Ym6FnsaYW9ObFQq5leKxPok5Xu3apftMP9PWOFJhTkQS77Kszg3UL/tvDa xrFO+fccjnEinAwKlvOYmW4H57pNDmyMjpzn/QJqMzxEpJz3hQGcKBApTXA2oOmf8AXu DF0AAKNYLHU+7QtG277gnBnet+zCIin7b2uWFqee2JBmO5PvxeKWoa90JkkxIAC00bmy crfnPHz6H4cIwKgxT9DGNQVEwd3knJ+4hzmp9T6S1/U7C8htBantvczn0QHbEQhf1zXD syXRezeOhbbODfpHbnXVgebHe57AQNEMXCmSAo5gtfanS/Da+DD6+EYW4eesoHphw5+4 8rLw== 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=34pxe1h3YY0OI+duX/k0TnvmNUgI5sFQGvwOcS1TX2s=; b=QuVlyaYU70xI1L+s8vHss0dVKKKtDBh7ovYCFTdaFQ8ObHJhY/A1u6OOjgR4Ml3srE PvL4mywVdi/bs71Fzhi/rIVLfQp011x/QCzDvR+rUzv9E88PyX3pVYzYF0JNoj2w4r4w XSFVf/Ivn4DntN5ai6R+c77kDjJNoyInaxL1hK01Gwi01dxildw9WlIGEC6xZqlJURaP DRTB6HifRknkrcqAQ3TCO/I5jjg6REFpoTEm1+XKBg1Jilv5Z7DVG/WMJ+pHdHZsobXo pim2RATA3rboEcLG/tkUnx/WLUQZtkN36szwSm9E88kv8IrSIgxk6Ln6yaAIxbzF+mzY p0Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b+9sQT4r; 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 j4si4133518plk.665.2017.11.23.07.37.23; Thu, 23 Nov 2017 07:37:35 -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=b+9sQT4r; 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 S1753029AbdKWPgc (ORCPT + 76 others); Thu, 23 Nov 2017 10:36:32 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:35121 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752875AbdKWPgb (ORCPT ); Thu, 23 Nov 2017 10:36:31 -0500 Received: by mail-pl0-f67.google.com with SMTP id 62so2851008plc.2 for ; Thu, 23 Nov 2017 07:36:31 -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=34pxe1h3YY0OI+duX/k0TnvmNUgI5sFQGvwOcS1TX2s=; b=b+9sQT4rLbVBLAoyhB62WXj+9RrY8EJnrXm+JAe7bHEgmTNo/K2H66QC5Q9xDdTlfX vQvn59Sjqa3x3SnDA9dq/b0kzkHM6C1c2YqWv8GQerfs0huJ8HOxEcXoS31iHcFrRgY5 vhsIDX2ShuDgcsxZ6Xh+/jvGVVB/g617pc4b8/h6ehhJ4FiXpRFVbbAozFUBcwHwrXzN r8tAOqgwuTlGD7Y7ocGLPXoVxJRLO/G0pkFRlS8nUI7axeZ0r726ti4wPaZVHDcSCIA0 m+XExhWGKcDjkUTO/UwARvWo5Q0VKR55KziFAF5ODtBwz8U0MeCpXE4uvc+Iv2y9mL6D gqRA== 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=34pxe1h3YY0OI+duX/k0TnvmNUgI5sFQGvwOcS1TX2s=; b=rZNQGk9s95oCz+mBHG68AtcRNUazBgIPkdrAz+lzgpbxHlPI0GHjym3zulkSfKaCaX I66X5Q0zMpq1H3ykeSgTuCsr1cttJxDY+4NVr9fOgwDCcS7PbaJsD/pwo07AwwUeaJmD zKPB75gO3j2DJyLMxtrjUGd2w1bpGhZ83zSP581nNJOoYY3o82kr1Py2qEV8qDyKoeO5 oq/fg/mJdSpsGaFpN9SrPeEDZw8K/+xFzDjBu40p2KfdXHIyWoe609mYBENkBLk0AU26 tk+aQKZrYawvzR5jZ9/KYKuchg23rOFP+KbmJepfD0EsYZ3ZHxW3CRVQArknDd4UT4Xp vbkg== X-Gm-Message-State: AJaThX6rJ+ASfdXsUVTst9K0Iwfdk4j15Az6qBESr5HjIE/rMdjUQzOl 5VRXrwbAXKo6jMJYfZns77w= X-Received: by 10.84.131.35 with SMTP id 32mr19985429pld.347.1511451391291; Thu, 23 Nov 2017 07:36:31 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id 69sm35189045pft.11.2017.11.23.07.36.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Nov 2017 07:36:29 -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] MIPS: ralink: ix platform_get_irq's error checking Date: Thu, 23 Nov 2017 21:06:10 +0530 Message-Id: <4b30004af37521b2102a4eda7c15f7257437ac85.1511451256.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 --- 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 1584713029640357186@xxx Tue Nov 21 21:35:15 +0000 2017 X-GM-THRID: 1583177229608801208 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread