linux-stable/drivers/parport
QiaoChong 25970b517d parport_pc: fix find_superio io compare code, should use equal test.
commit 21698fd579 upstream.

In the original code before 181bf1e815 the loop was continuing until
it finds the first matching superios[i].io and p->base.
But after 181bf1e815 the logic changed and the loop now returns the
pointer to the first mismatched array element which is then used in
get_superio_dma() and get_superio_irq() and thus returning the wrong
value.
Fix the condition so that it now returns the correct pointer.

Fixes: 181bf1e815 ("parport_pc: clean up the modified while loops using for")
Cc: Alan Cox <alan@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: QiaoChong <qiaochong@loongson.cn>
[rewrite the commit message]
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-23 20:10:05 +01:00
..
BUGS-parport
daisy.c parport: cleanup statics initialization to NULL or 0 2017-08-28 17:25:43 +02:00
ieee1284.c parport: ieee1284: mark expected switch fall-throughs 2018-07-15 14:13:00 +02:00
ieee1284_ops.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig docs: Fix some broken references 2018-06-15 18:10:01 -03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
multiface.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
parport_amiga.c
parport_atari.c parport: cleanup statics initialization to NULL or 0 2017-08-28 17:25:43 +02:00
parport_ax88796.c parport: ax88796: Delete an unnecessary variable initialisation in parport_ax88796_probe() 2018-03-14 17:54:09 +01:00
parport_cs.c
parport_gsc.c parisc/parport_gsc: Use NULL to avoid sparse warning 2018-03-27 18:52:21 +02:00
parport_gsc.h
parport_ip32.c parport: make parport_ip32_ops const and __initconst 2017-10-20 15:17:44 +02:00
parport_mfc3.c parport: cleanup statics initialization to NULL or 0 2017-08-28 17:25:43 +02:00
parport_pc.c parport_pc: fix find_superio io compare code, should use equal test. 2019-03-23 20:10:05 +01:00
parport_serial.c parport: parport_serial: Add WCH CH382L PCIe single parallel port support 2018-07-07 17:35:10 +02:00
parport_sunbpp.c parport: sunbpp: fix error return code 2018-07-15 14:13:00 +02:00
probe.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
procfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
share.c parport: fix attempt to write duplicate procfiles 2017-03-16 17:32:21 +09:00
TODO-parport