Messages in this thread Patch in this message | | | From | Jason Wang <> | Subject | [PATCH] pcmcia: pcmcia_resource: return 0 if success | Date | Sun, 12 Dec 2021 15:56:30 +0800 |
| |
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
| |