[PATCH] Linux 2.5.68 - Fix module_put after return statement

From: Gabriel Devenyi (devenyga@mcmaster.ca)
Date: Thu May 01 2003 - 14:48:15 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This patch applies to 2.5.68. Its listed on kbugs.org. The function module_put is never called because it is after return.

Please CC me with any discussion.
- --
Building the Future,
Gabriel Devenyi
devenyga@mcmaster.ca

- ---FILE---

- --- linux-2.5.68/drivers/net/wan/c101.c 2003-04-19 22:50:34.000000000 -0400
+++ linux-2.5.68-changed/drivers/net/wan/c101.c 2003-05-01 15:04:23.000000000 -0400
@@ -161,8 +161,8 @@
 
         int result = hdlc_open(hdlc);
         if (result) {
- - return result;
                 module_put(THIS_MODULE);
+ return result;
         }
 
         writeb(1, port->win0base + C101_DTR);

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

iD8DBQE+sXn/7I5UBdiZaF4RAitxAJ9UHBL/iO7nuElsJkIBTqivnGoGDQCfQYbj
6ZrVhEXv1ir82/V/KKHjEQI=
=xOsM
-----END PGP SIGNATURE-----

-
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 : Wed Apr 30 2003 - 22:00:36 EST