[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190129063855.4831-1-qiaochong@loongson.cn>
Date: Tue, 29 Jan 2019 14:38:55 +0800
From: qiaochong <qiaochong@...ngson.cn>
To: Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc: linux-kernel@...r.kernel.org, QiaoChong <qiaochong@...ngson.cn>
Subject: [PATCH] parport_pc: fix find_superio io compare code, should use equal test.
From: QiaoChong <qiaochong@...ngson.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 <qiaochong@...ngson.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
Powered by blists - more mailing lists