diff options
author | Sergio Paracuellos <sergio.paracuellos@gmail.com> | 2016-10-10 16:02:22 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-16 10:26:24 +0200 |
commit | 67fafe375a634fa7cd4dc4f710e106c32a406e8a (patch) | |
tree | aa4e6a53dadf027e37c7da956addf813cc115736 /drivers | |
parent | ec30aebb0db01375e0594f1b6c2bb9335801a913 (diff) | |
download | linux-stable-67fafe375a634fa7cd4dc4f710e106c32a406e8a.tar.gz linux-stable-67fafe375a634fa7cd4dc4f710e106c32a406e8a.tar.bz2 linux-stable-67fafe375a634fa7cd4dc4f710e106c32a406e8a.zip |
staging: wlan-ng: Replace data type declaration with variable of same type in prism2sta.c
sizeof(*var) instead of sizeof(struct XXX) is preferred.
Fix them in prism2sta.c file.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/wlan-ng/prism2sta.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index b3ae2bb9ae42..351f08d6a5d9 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -1102,8 +1102,7 @@ static void prism2sta_inf_hostscanresults(struct wlandevice *wlandev, kfree(hw->scanresults); - hw->scanresults = kmemdup(inf, sizeof(struct hfa384x_inf_frame), - GFP_ATOMIC); + hw->scanresults = kmemdup(inf, sizeof(*inf), GFP_ATOMIC); if (nbss == 0) nbss = -1; @@ -1888,8 +1887,8 @@ static struct wlandevice *create_wlan(void) struct hfa384x *hw = NULL; /* Alloc our structures */ - wlandev = kzalloc(sizeof(struct wlandevice), GFP_KERNEL); - hw = kzalloc(sizeof(struct hfa384x), GFP_KERNEL); + wlandev = kzalloc(sizeof(*wlandev), GFP_KERNEL); + hw = kzalloc(sizeof(*hw), GFP_KERNEL); if (!wlandev || !hw) { kfree(wlandev); |