lkml.org 
[lkml]   [2019]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] parport_pc: fix find_superio io compare code, should use equal test.
Date
From: QiaoChong <qiaochong@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 <qiaochong@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

\
 
 \ /
  Last update: 2019-01-29 07:40    [W:0.035 / U:6.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site