[patch] Serial 2/2

From: Hu Gang (gang_hu@soul.com.cn)
Date: Sat Sep 28 2002 - 23:17:59 EST


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


- 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/



This archive was generated by hypermail 2b29 : Mon Sep 30 2002 - 22:00:39 EST