From: QiaoChong <qiaoch...@loongson.cn>

Fixes: 181bf1e815a2a("parport_pc: clean up the modified while loops using for").
The code find_superio should test superio[i].io == p->base then find out 
superio, fix it.

Signed-off-by: QiaoChong <qiaoch...@loongson.cn>
---
 drivers/parport/parport_pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index 9c8249f744792..6296dbb83d470 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -1377,7 +1377,7 @@ static struct superio_struct *find_superio(struct parport 
*p)
 {
        int i;
        for (i = 0; i < NR_SUPERIOS; i++)
-               if (superios[i].io != p->base)
+               if (superios[i].io == p->base)
                        return &superios[i];
        return NULL;
 }
-- 
2.17.0


Reply via email to