aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-05-25 21:59:29 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-06-11 14:28:43 -0400
commit94b23855c034ffa50e1f94f43ef4500520e4c36e (patch)
tree5a1369eb2732dde850d562b96318cda32ecb68d5
parent6cfb00823872d0181c5c72c2d457de93518d96e7 (diff)
[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 <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/libertas/ioctl.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/wireless/libertas/ioctl.c b/drivers/net/wireless/libertas/ioctl.c
index cfb4752b3bce..a59d26ba6c70 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)
603 char *ptr = in_str; 603 char *ptr = in_str;
604 static char out_str[128]; 604 static char out_str[128];
605 char *pbuf = out_str; 605 char *pbuf = out_str;
606 int ret; 606 int ret = 0;
607 607
608 lbs_deb_enter(LBS_DEB_IOCTL); 608 lbs_deb_enter(LBS_DEB_IOCTL);
609 609
610 if (copy_from_user(in_str, wrq->u.data.pointer, sizeof(in_str))) 610 if (copy_from_user(in_str, wrq->u.data.pointer, sizeof(in_str))) {
611 return -EFAULT; 611 ret = -EFAULT;
612 goto out;
613 }
612 614
613 fwt_access.id = cpu_to_le32(simple_strtoul(ptr, &ptr, 10)); 615 fwt_access.id = cpu_to_le32(simple_strtoul(ptr, &ptr, 10));
614 616
@@ -632,11 +634,15 @@ static int wlan_fwt_list_ioctl(wlan_private * priv, struct ifreq *req)
632 if (copy_to_user(wrq->u.data.pointer, (char *)out_str, 634 if (copy_to_user(wrq->u.data.pointer, (char *)out_str,
633 wrq->u.data.length)) { 635 wrq->u.data.length)) {
634 lbs_deb_ioctl("FWT_LIST: Copy to user failed!\n"); 636 lbs_deb_ioctl("FWT_LIST: Copy to user failed!\n");
635 return -EFAULT; 637 ret = -EFAULT;
638 goto out;
636 } 639 }
637 640
641 ret = 0;
642
643out:
638 lbs_deb_leave(LBS_DEB_IOCTL); 644 lbs_deb_leave(LBS_DEB_IOCTL);
639 return 0; 645 return ret;
640} 646}
641 647
642/** 648/**