linux-brain/drivers/parport
QiaoChong 89541fbb58 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 14:35:24 +01:00
..
BUGS-parport
daisy.c parport: cleanup statics initialization to NULL or 0 2017-08-28 17:25:43 +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
ieee1284.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
Kconfig parport: fix menu breakage 2014-07-25 18:00:23 -07: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: drop owner assignment from platform_drivers 2014-10-20 16:21:20 +02:00
parport_atari.c parport: cleanup statics initialization to NULL or 0 2017-08-28 17:25:43 +02:00
parport_ax88796.c parport: use release_mem_region instead of release_resource 2017-08-28 17:25:43 +02:00
parport_cs.c drivers/parport: use module_pcmcia_driver() in pcmcia drivers 2013-03-15 12:26:38 -07:00
parport_gsc.c parisc/parport_gsc: Fix section mismatches 2017-08-22 16:34:36 +02:00
parport_gsc.h parisc: parport0: fix this legacy no-device port driver! 2013-06-01 14:46:42 +02:00
parport_ip32.c parport: cleanup statics initialization to NULL or 0 2017-08-28 17:25:43 +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 14:35:24 +01:00
parport_serial.c parport: Add support for the WCH382 2S/1P multi-IO card 2014-11-06 14:58:21 -08:00
parport_sunbpp.c parport: sunbpp: fix error return code 2018-09-26 08:38:12 +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