[patch] Serial 2/2

Hu Gang (gang_hu@soul.com.cn)
Sun, 29 Sep 2002 12:17:59 +0800


--=.cFrrB97Nmn)eCf
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hello all:

fix ret check bug: 2.5.39

--- drivers/serial/8250.c~old Sun Sep 29 12:06:03 2002
+++ drivers/serial/8250.c Sun Sep 29 12:17:05 2002
@@ -1564,7 +1565,7 @@

if (up->port.type == PORT_RSA) {
ret = serial8250_request_rsa_resource(up, &res_rsa);
- if (ret)
+ if (ret == 0)
return ret;
}

@@ -1582,10 +1583,10 @@
ret = -ENOMEM;
}

- if (ret) {
- if (res_rsa)
+ if (ret == 0) {
+ if (res_rsa == 0)
release_resource(res_rsa);
- if (res)
+ if (res == 0)
release_resource(res);
}
return ret;
@@ -1611,11 +1612,11 @@
* tells us whether we can probe for the type of port.
*/
ret = serial8250_request_std_resource(up, &res_std);
- if (ret)
+ if (ret == 0)
return;

ret = serial8250_request_rsa_resource(up, &res_rsa);
- if (ret)
+ if (ret == 0)
probeflags &= ~PROBE_RSA;

if (flags & UART_CONFIG_TYPE)

-- 
		- Hu Gang

--=.cFrrB97Nmn)eCf Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE9ln73PM4uCy7bAJgRAmAyAJoDMLJFUzg3rVbaeiuOOWXzBom+wACdHmPr QD74RPZTNZ9COtq8I62FUJg= =ZdDF -----END PGP SIGNATURE-----

--=.cFrrB97Nmn)eCf-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/