Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=94b23855c034ffa50e1f94f43ef4500520e4c36e
Commit:     94b23855c034ffa50e1f94f43ef4500520e4c36e
Parent:     6cfb00823872d0181c5c72c2d457de93518d96e7
Author:     Dan Williams <[EMAIL PROTECTED]>
AuthorDate: Fri May 25 21:59:29 2007 -0400
Committer:  John W. Linville <[EMAIL PROTECTED]>
CommitDate: Mon Jun 11 14:28:43 2007 -0400

    [PATCH] libertas: correct error report paths for wlan_fwt_list_ioctl
    
    Ensure the leave debug print gets triggered when necessary.
    
    Signed-off-by: Dan Williams <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 drivers/net/wireless/libertas/ioctl.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/libertas/ioctl.c 
b/drivers/net/wireless/libertas/ioctl.c
index cfb4752..a59d26b 100644
--- a/drivers/net/wireless/libertas/ioctl.c
+++ b/drivers/net/wireless/libertas/ioctl.c
@@ -603,12 +603,14 @@ static int wlan_fwt_list_ioctl(wlan_private * priv, 
struct ifreq *req)
        char *ptr = in_str;
        static char out_str[128];
        char *pbuf = out_str;
-       int ret;
+       int ret = 0;
 
        lbs_deb_enter(LBS_DEB_IOCTL);
 
-       if (copy_from_user(in_str, wrq->u.data.pointer, sizeof(in_str)))
-               return -EFAULT;
+       if (copy_from_user(in_str, wrq->u.data.pointer, sizeof(in_str))) {
+               ret = -EFAULT;
+               goto out;
+       }
 
        fwt_access.id = cpu_to_le32(simple_strtoul(ptr, &ptr, 10));
 
@@ -632,11 +634,15 @@ static int wlan_fwt_list_ioctl(wlan_private * priv, 
struct ifreq *req)
        if (copy_to_user(wrq->u.data.pointer, (char *)out_str,
                         wrq->u.data.length)) {
                lbs_deb_ioctl("FWT_LIST: Copy to user failed!\n");
-               return -EFAULT;
+               ret = -EFAULT;
+               goto out;
        }
 
+       ret = 0;
+
+out:
        lbs_deb_leave(LBS_DEB_IOCTL);
-       return 0;
+       return ret;
 }
 
 /**
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to