Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1187820

[PATCH 4.0 49/58] genirq: devres: Fix testing return value of request_any_context_irq()

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.0 49/58] genirq: devres: Fix testing return value of request_any_context_irq()
Date Sun, 19 Jul 2015 21:30:04 +0200
Message-ID <pO2rG-3BN-75@gated-at.bofh.it> (permalink)
References <pO2hX-3q1-3@gated-at.bofh.it>
X-Original-To linux-kernel@vger.kernel.org
X-Mailer git-send-email 2.4.6
User-Agent quilt/0.64
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 53
Organization linux.* mail to news gateway
X-Original-Cc Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Axel Lin <axel.lin@ingics.com>, Stephen Boyd <sboyd@codeaurora.org>, Thomas Gleixner <tglx@linutronix.de>
X-Original-Date Sun, 19 Jul 2015 12:11:27 -0700
X-Original-Message-ID <20150719190812.874700114@linuxfoundation.org>
X-Original-References <20150719190811.308546345@linuxfoundation.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1187820

Show key headers only | View raw


4.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Axel Lin <axel.lin@ingics.com>

commit 63781394c540dd9e666a6b21d70b64dd52bce76e upstream.

request_any_context_irq() returns a negative value on failure.
It returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED on success.
So fix testing return value of request_any_context_irq().

Also fixup the return value of devm_request_any_context_irq() to make it
consistent with request_any_context_irq().

Fixes: 0668d3065128 ("genirq: Add devm_request_any_context_irq()")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Link: http://lkml.kernel.org/r/1431334978.17783.4.camel@ingics.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/irq/devres.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/kernel/irq/devres.c
+++ b/kernel/irq/devres.c
@@ -104,7 +104,7 @@ int devm_request_any_context_irq(struct
 		return -ENOMEM;
 
 	rc = request_any_context_irq(irq, handler, irqflags, devname, dev_id);
-	if (rc) {
+	if (rc < 0) {
 		devres_free(dr);
 		return rc;
 	}
@@ -113,7 +113,7 @@ int devm_request_any_context_irq(struct
 	dr->dev_id = dev_id;
 	devres_add(dev, dr);
 
-	return 0;
+	return rc;
 }
 EXPORT_SYMBOL(devm_request_any_context_irq);
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4.0 00/58] 4.0.9-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 36/58] regmap: Fix possible shift overflow in regmap_field_init() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 57/58] of/pci: Fix pci_address_to_pio() conversion of CPU address to I/O port Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 35/58] regmap: Fix regmap_bulk_read in BE mode Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 22/58] tools selftests: Fix clean target with make 3.81 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 09/58] sysfs: Create mountpoints with sysfs_create_mount_point Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 20/58] ACPI / PM: Add missing pm_generic_complete() invocation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 33/58] mm, thp: respect MPOL_PREFERRED policy with non-local node Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 24/58] ARC: add compiler barrier to LLSC based cmpxchg Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 44/58] scsi_transport_srp: Fix a race condition Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 19/58] ACPI / init: Switch over platform to the ACPI mode later Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 32/58] mm: kmemleak_alloc_percpu() should follow the gfp from per_alloc() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 31/58] mm: kmemleak: allow safe memory scanning during kmemleak disabling Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 18/58] ALSA: hda - Fix the dock headphone output on Fujitsu Lifebook E780 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 23/58] ARC: add smp barriers around atomics per Documentation/atomic_ops.txt Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 07/58] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 26/58] mei: txe: reduce suspend/resume time Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 15/58] ALSA: hda - Fix Dock Headphone on Thinkpad X250 seen as a Line Out Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 29/58] arm64: mm: Fix freeing of the wrong memmap entries with !SPARSEMEM_VMEMMAP Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 30/58] arm64: vdso: work-around broken ELF toolchains in Makefile Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 25/58] mei: me: wait for power gating exit confirmation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 27/58] arm64: Do not attempt to use init_mm in reset_context() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 28/58] arm64: entry: fix context tracking for el0_sp_pc Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 21/58] iio: accel: kxcjk-1013: add the "KXCJ9000" ACPI id Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 17/58] ALSA: hda - Add headset support to Acer Aspire V5 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 08/58] mnt: Modify fs_fully_visible to deal with locked ro nodev and atime Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 16/58] ALSA: hda - set proper caps for newer AMD hda audio in KB/KV Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 58/58] Input: pixcir_i2c_ts - fix receive error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:20 +0200
  [PATCH 4.0 02/58] sysctl: Allow creating permanently empty directories that serve as mountpoints. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 39/58] livepatch: add module locking around kallsyms calls Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 55/58] PCI: Add pci_bus_addr_t Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 41/58] spi: orion: Fix maximum baud rates for Armada 370/XP Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 52/58] mtd: fix: avoid race condition when accessing mtd->usecount Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 14/58] ALSA: pcm: Fix pcm_class sysfs output Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 38/58] regulator: core: fix constraints output buffer Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 05/58] sysfs: Add support for permanently empty directories to serve as mount points. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 12/58] ipr: Increase default adapter init stage change timeout Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 37/58] regulator: max77686: fix gpio_enabled shift wrapping bug Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 47/58] IB/srp: Fix connection state tracking Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 56/58] PCI: pciehp: Wait for hotplug command completion where necessary Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 42/58] spi: pl022: Specify num-cs property as required in devicetree binding Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 43/58] scsi_transport_srp: Introduce srp_wait_for_queuecommand() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 48/58] IB/srp: Fix reconnection failure handling Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 45/58] IB/srp: Remove an extraneous scsi_host_put() from an error path Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 03/58] proc: Allow creating permanently empty directories that serve as mount points Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 13/58] Disable write buffering on Toshiba ToPIC95 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 46/58] IB/srp: Fix a connection setup race Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 54/58] PCI: Propagate the "ignore hotplug" setting to parent Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 04/58] kernfs: Add support for always empty directories. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 50/58] video: mxsfb: Make sure axi clock is enabled when accessing registers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 06/58] mnt: Update fs_fully_visible to test for permanently empty directories Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 01/58] fs: Add helper functions for permanently empty directories. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 49/58] genirq: devres: Fix testing return value of request_any_context_irq() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 10/58] gpio: crystalcove: set IRQCHIP_SKIP_SET_WAKE for the irqchip Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  [PATCH 4.0 51/58] leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:30 +0200
  Re: [PATCH 4.0 00/58] 4.0.9-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2015-07-20 19:20 +0200

csiph-web