linux/drivers/misc
Vaibhav Jain ef6cb5f1a0 cxl: Fix wrong comparison in cxl_adapter_context_get()
Function atomic_inc_unless_negative() returns a bool to indicate
success/failure. However cxl_adapter_context_get() wrongly compares
the return value against '>=0' which will always be true. The patch
fixes this comparison to '==0' there by also fixing this compile time
warning:

	drivers/misc/cxl/main.c:290 cxl_adapter_context_get()
	warn: 'atomic_inc_unless_negative(&adapter->contexts_num)' is unsigned

Fixes: 70b565bbdb ("cxl: Prevent adapter reset if an active context exists")
Cc: stable@vger.kernel.org # v4.9+
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-07-19 21:58:11 +10:00
..
altera-stapl treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
c2port kmemcheck: remove annotations 2017-11-15 18:21:04 -08:00
cardreader for-4.17/block-20180402 2018-04-05 14:27:02 -07:00
cb710 treewide: Use struct_size() for devm_kmalloc() and friends 2018-06-06 11:15:43 -07:00
cxl cxl: Fix wrong comparison in cxl_adapter_context_get() 2018-07-19 21:58:11 +10:00
echo misc: Remove Blackfin DSP echo support 2018-03-26 15:56:37 +02:00
eeprom Merge branch 'i2c/for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-06-14 16:21:46 +09:00
genwqe treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
ibmasm Merge branch 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-11-15 10:14:11 -08:00
lis3lv02d vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
lkdtm lkdtm: Add missing SPDX-License-Identifier line 2018-03-06 19:18:55 -08:00
mei mei: remove dev_err message on an unsupported ioctl 2018-03-14 19:33:13 +01:00
mic misc: mic: Release reference count and memory for VOP device 2018-03-15 18:12:01 +01:00
ocxl ocxl: Fix page fault handler in case of fault on dying process 2018-07-02 23:59:45 +10:00
sgi-gru Char/Misc driver patches for 4.18-rc1 2018-06-05 16:20:22 -07:00
sgi-xp treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
ti-st misc: ti-st: Replace GFP_ATOMIC with GFP_KERNEL in kim_probe 2018-04-23 13:31:27 +02:00
vmw_vmci treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c misc: ad525x_dpot: macros should not use a trailing semicolon 2017-12-18 16:02:26 +01:00
ad525x_dpot.h misc: ad525x_dpot: Unnecessary space before function pointer arguments 2017-12-18 15:59:17 +01:00
apds990x.c misc: apds990x: Missing a blank line after declarations. 2017-12-18 16:02:26 +01:00
apds9802als.c misc: apds9802als: constify i2c_device_id 2017-08-28 16:55:49 +02:00
aspeed-lpc-ctrl.c misc: aspeed-lpc-ctrl: Enable FWH and A2H bridge cycles 2018-03-15 18:20:51 +01:00
aspeed-lpc-snoop.c drivers/misc: (aspeed-lpc-snoop): Add ast2400 to compat 2017-07-17 17:23:16 +02:00
atmel_tclib.c
atmel-ssc.c misc: atmel-ssc: register as sound DAI if #sound-dai-cells is present 2016-12-15 12:13:31 +00:00
bh1770glc.c misc: bh1770glc: constify attribute_group structures. 2017-08-28 16:55:48 +02:00
cs5535-mfgpt.c
ds1682.c misc: ds1682: Ignore update-in-progress ETC reads 2018-01-09 17:03:57 +01:00
dummy-irq.c Annotate hardware config module parameters in drivers/misc/ 2017-04-20 12:02:32 +01:00
enclosure.c misc: enclosure: Remove unnecessary error check 2017-12-07 18:45:31 +01:00
fsa9480.c misc: fsa9480: Add blank line after declarations. 2018-01-09 17:03:57 +01:00
hmc6352.c misc: hmc6352: constify i2c_device_id 2017-08-28 16:55:49 +02:00
hpilo.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
hpilo.h misc: hpilo: Use SPDX-License-Identifier 2017-12-07 18:45:31 +01:00
ibmvmc.c misc: IBM Virtual Management Channel Driver (VMC) 2018-05-14 16:35:42 +02:00
ibmvmc.h misc: IBM Virtual Management Channel Driver (VMC) 2018-05-14 16:35:42 +02:00
ics932s401.c misc: ics932s401: open brace should be on the previous line 2017-12-18 16:00:57 +01:00
ioc4.c misc: ioc4: constify pci_device_id. 2017-08-28 16:55:48 +02:00
isl29003.c misc: isl29003: Missing a blank line after declarations 2017-12-07 18:45:31 +01:00
isl29020.c misc: isl29020: constify i2c_device_id 2017-08-28 16:55:49 +02:00
Kconfig misc: IBM Virtual Management Channel Driver (VMC) 2018-05-14 16:35:42 +02:00
kgdbts.c misc: kgdbts: Display progress of asynchronous tests 2018-01-25 08:40:17 -06:00
lattice-ecp3-config.c
Makefile misc: IBM Virtual Management Channel Driver (VMC) 2018-05-14 16:35:42 +02:00
pch_phub.c MISC: add const to bin_attribute structures 2017-08-28 16:55:48 +02:00
pci_endpoint_test.c Merge branch 'lorenzo/pci/endpoint' 2018-06-06 16:10:30 -05:00
phantom.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
pti.c drivers/misc/intel/pti: Rename the header file to free up the namespace 2017-12-17 12:52:34 +01:00
qcom-coincell.c
spear13xx_pcie_gadget.c
sram-exec.c misc: sram-exec: Use aligned fncpy instead of memcpy 2017-05-18 17:37:52 +02:00
sram.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
sram.h misc: sram: Integrate protect-exec reserved sram area type 2017-01-25 11:48:03 +01:00
tifm_7xx1.c misc: tifm: Remove VLA 2018-04-23 13:31:27 +02:00
tifm_core.c
tsl2550.c misc: tsl2550: Add OF device ID table 2017-04-08 18:22:59 +02:00
vexpress-syscfg.c treewide: Use struct_size() for kmalloc()-family 2018-06-06 11:15:43 -07:00
vmw_balloon.c vmw_balloon: fixing double free when batching mode is off 2018-06-02 19:34:13 +02:00