Commit 94b23855 authored by Dan Williams's avatar Dan Williams Committed by John W. Linville

[PATCH] libertas: correct error report paths for wlan_fwt_list_ioctl

Ensure the leave debug print gets triggered when necessary.
Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6cfb0082
...@@ -603,12 +603,14 @@ static int wlan_fwt_list_ioctl(wlan_private * priv, struct ifreq *req) ...@@ -603,12 +603,14 @@ static int wlan_fwt_list_ioctl(wlan_private * priv, struct ifreq *req)
char *ptr = in_str; char *ptr = in_str;
static char out_str[128]; static char out_str[128];
char *pbuf = out_str; char *pbuf = out_str;
int ret; int ret = 0;
lbs_deb_enter(LBS_DEB_IOCTL); lbs_deb_enter(LBS_DEB_IOCTL);
if (copy_from_user(in_str, wrq->u.data.pointer, sizeof(in_str))) if (copy_from_user(in_str, wrq->u.data.pointer, sizeof(in_str))) {
return -EFAULT; ret = -EFAULT;
goto out;
}
fwt_access.id = cpu_to_le32(simple_strtoul(ptr, &ptr, 10)); 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) ...@@ -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, if (copy_to_user(wrq->u.data.pointer, (char *)out_str,
wrq->u.data.length)) { wrq->u.data.length)) {
lbs_deb_ioctl("FWT_LIST: Copy to user failed!\n"); 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); lbs_deb_leave(LBS_DEB_IOCTL);
return 0; return ret;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment