lkml.org 
[lkml]   [2021]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] pcmcia: pcmcia_resource: return 0 if success
Date
The initial value of variable `ret' is -EINVAL, which is used for
returning the error status in `pcmcia_release_io' when errors occur.
But if there is no error in `pcmcia_release_io', `ret' should be changed
to a successful value to return. Thus we change `ret' value to 0 when
the function's status is successful.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
---
drivers/pcmcia/pcmcia_resource.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index c1c197292111..257181cb686f 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -409,6 +409,7 @@ static int pcmcia_release_io(struct pcmcia_device *p_dev)

p_dev->_io = 0;
c->state &= ~CONFIG_IO_REQ;
+ ret = 0;

out:
mutex_unlock(&s->ops_mutex);
--
2.34.1
\
 
 \ /
  Last update: 2021-12-12 08:59    [W:0.094 / U:1.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site