Received: by 10.223.164.202 with SMTP id h10csp886296wrb; Thu, 23 Nov 2017 07:47:42 -0800 (PST) X-Google-Smtp-Source: AGs4zMbaXe+NrSUBHjqb4zTfJK2IMP2asCGNhqFFZXIBY2ad4f6OX1Q3//Y5HZymd77wRoiIiwgT X-Received: by 10.99.153.2 with SMTP id d2mr2493921pge.379.1511452062615; Thu, 23 Nov 2017 07:47:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511452062; cv=none; d=google.com; s=arc-20160816; b=yeVJaMCUlh3l0STpD7df0ApZaQ4BBo9yDs6dCPzGUWsW8/ThEj/yONFqmycOOUWyZE mXLfDMLrHWq5hjf+r9vSHyQuMtHpbX+6CGjEo//egq6jY2yc+cG4iLCkisJlV+QgDWl7 YTPfXPEPgVZgQhzK+eSB42NG2s0Tyk1zADMVBQVd+XnFh8PNP0/JR8X/01I0Pl4HPKny zeYaOD1vy6koI+6BdJXd9KBKLpBxjiqIUJqpUBE3cNNZFkk94VXXMcQXJKhTrsVEGrhg /d6d8kYUOSyQYi1OVAOsEfqsQQNfAbTLHxnLgpc8iDGmMoDkrdQDBD2cU9hODAOUlEqY J+hA== 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=WsQpYNRfYr5OtHUTZVH6o38ARFyw7tRQ2/mqCdxl0yw=; b=cesSd+zmY0ZUPGzi4XgH+CxHFChe2Ub+78KUu2wQWuabvWepUhHodQ5Z/qcBhYULFG VPMMKJaJlE3GmHxBLw9VtciwHwZdLC4ILtmfIgFVr8EgOlzjHwIc0l1IRYACUlYQj2jg TdFRwG/g5tMrMxO9saa9jr59b//BGmtIt7CO/jFTxf/nYmNG1NTVJ8ujY40f4dnC2RhP jXXHBeUUFLUxma/8IXX+fOFRI7OZ5aOowzGJp5QvUFvbdeYwy5+Y5pxJUGcAjE5toIzu QwmfjMpxqa00kgxQFAkPPsPVtVMjErR4kUZE1MxYs3ctzOPzvALS8gtziseh6Ayho3UU 8nqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=shIN/Q2q; 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 w2si16379865plz.643.2017.11.23.07.47.31; Thu, 23 Nov 2017 07:47:42 -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=shIN/Q2q; 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 S1752959AbdKWPqo (ORCPT + 76 others); Thu, 23 Nov 2017 10:46:44 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:37215 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752204AbdKWPqn (ORCPT ); Thu, 23 Nov 2017 10:46:43 -0500 Received: by mail-pg0-f67.google.com with SMTP id m4so4228794pgc.4 for ; Thu, 23 Nov 2017 07:46:43 -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=WsQpYNRfYr5OtHUTZVH6o38ARFyw7tRQ2/mqCdxl0yw=; b=shIN/Q2qpl0QOs2K2cjeb+nsXwvv2/VIiBZgMmrH0IaKSz7fIXGyfmyK6Rcx3i9rbZ SUlmJCw1QlVwVQjuNhj/iNDEMJyMak1vL6PB71mbMKpNiTFb0AAcdnAMSD5j5GSyW8Lq Rcf8LAw39Db7k05pRUE8Yt0xjnol3LyO9RK7TjyJUl90v9vXWl3blmYIhDaaMP6NIOb+ UfNEbbUN5jF/EGWWNqQEskVMnc//eQtvMEEFTkh6OvwTX8sRzFtkLIFPlukGSOvVpIbf e2Ff3Qgfjre94owcJuaGpB8hvlbvLYQFZ7G+9Q1W4Lt7W+f90Ww3AHGeORB55/KVIbrL p44g== 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=WsQpYNRfYr5OtHUTZVH6o38ARFyw7tRQ2/mqCdxl0yw=; b=T/EGwnUkqo9xXnYxoQMvw6FApPBYSfazd1PSn1Oq2rJvqux/67adPp6S9iN8/9il6b vYA4oag2HWBKT3CSaXV1FtvIi5wYw10ws0s1Un3bYBaezeiwhEXEgogRq4HhFdGcsp98 Nv3xP7pFG9eTtAKziRvaVcPC8xOBkzVYn8IZyc/PUF+6gghgNdvo9NygS9p684zS1TqH KyInVzANuBaYknIB6WBEfW8UM8FHIreR6iAW6icT1PWBIVIR/lxOMQHP1i07SrECqxoj 07rX6a1UJxcK6KH9JhSf9G8ujRCHpO0oLJRYNbDE9DIz5Mbbu0sdNiYuPVxym+wn2UKb pXkQ== X-Gm-Message-State: AJaThX6Jmb/bsLN7eg/6GLoAsVjDpRNwd/Y3oHLemr3QXDfyAuINYOWB d2dgBBYjYD8bV2E1cbNUWng= X-Received: by 10.101.85.3 with SMTP id f3mr24435099pgr.45.1511452003010; Thu, 23 Nov 2017 07:46:43 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id 67sm11304945pgg.50.2017.11.23.07.46.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Nov 2017 07:46:42 -0800 (PST) From: Arvind Yadav To: minyard@acm.org Cc: linux-kernel@vger.kernel.org, openipmi-developer@lists.sourceforge.net Subject: [PATCH] ipmi: bt-bmc: Fix platform_get_irq's error checking Date: Thu, 23 Nov 2017 21:16:35 +0530 Message-Id: <0a615dd873053a2a53cb2b924dd863a9b69fb180.1511451942.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 --- drivers/char/ipmi/bt-bmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c index 70d434b..7566683 100644 --- a/drivers/char/ipmi/bt-bmc.c +++ b/drivers/char/ipmi/bt-bmc.c @@ -410,7 +410,7 @@ static int bt_bmc_config_irq(struct bt_bmc *bt_bmc, int rc; bt_bmc->irq = platform_get_irq(pdev, 0); - if (!bt_bmc->irq) + if (bt_bmc->irq < 0) return -ENODEV; rc = devm_request_irq(dev, bt_bmc->irq, bt_bmc_irq, IRQF_SHARED, -- 2.7.4 From 1586069785993620774@xxx Wed Dec 06 21:00:18 +0000 2017 X-GM-THRID: 1585968957136333436 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread