diff options
author | Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> | 2012-11-16 07:52:22 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-11-27 14:44:27 -0500 |
commit | e16ccfeefbba6a268d00eb04145a172ad6e51cd8 (patch) | |
tree | 4b22d855836ee3eeb9b26361cb6715a0f36d59d3 /drivers | |
parent | 895dc3867705f7622977c8870771e15881b3e421 (diff) |
ath6kl: remove unnecessary check for NULL skb
dev_kfree_skb kernel API itself takes for checking for NULL
skb, so an explicit check is not required.
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/htc_pipe.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/usb.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.c | 11 |
3 files changed, 8 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/htc_pipe.c b/drivers/net/wireless/ath/ath6kl/htc_pipe.c index 575e7d74a5d5..73a38f9392f9 100644 --- a/drivers/net/wireless/ath/ath6kl/htc_pipe.c +++ b/drivers/net/wireless/ath/ath6kl/htc_pipe.c | |||
@@ -509,9 +509,7 @@ static void destroy_htc_txctrl_packet(struct htc_packet *packet) | |||
509 | { | 509 | { |
510 | struct sk_buff *skb; | 510 | struct sk_buff *skb; |
511 | skb = packet->skb; | 511 | skb = packet->skb; |
512 | if (skb != NULL) | 512 | dev_kfree_skb(skb); |
513 | dev_kfree_skb(skb); | ||
514 | |||
515 | kfree(packet); | 513 | kfree(packet); |
516 | } | 514 | } |
517 | 515 | ||
@@ -1054,6 +1052,7 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb, | |||
1054 | 1052 | ||
1055 | dev_kfree_skb(skb); | 1053 | dev_kfree_skb(skb); |
1056 | skb = NULL; | 1054 | skb = NULL; |
1055 | |||
1057 | goto free_skb; | 1056 | goto free_skb; |
1058 | } | 1057 | } |
1059 | 1058 | ||
@@ -1089,8 +1088,7 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb, | |||
1089 | skb = NULL; | 1088 | skb = NULL; |
1090 | 1089 | ||
1091 | free_skb: | 1090 | free_skb: |
1092 | if (skb != NULL) | 1091 | dev_kfree_skb(skb); |
1093 | dev_kfree_skb(skb); | ||
1094 | 1092 | ||
1095 | return status; | 1093 | return status; |
1096 | 1094 | ||
diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c index 62bcc0d5bc23..5fcd342762de 100644 --- a/drivers/net/wireless/ath/ath6kl/usb.c +++ b/drivers/net/wireless/ath/ath6kl/usb.c | |||
@@ -159,10 +159,8 @@ static void ath6kl_usb_free_urb_to_pipe(struct ath6kl_usb_pipe *pipe, | |||
159 | 159 | ||
160 | static void ath6kl_usb_cleanup_recv_urb(struct ath6kl_urb_context *urb_context) | 160 | static void ath6kl_usb_cleanup_recv_urb(struct ath6kl_urb_context *urb_context) |
161 | { | 161 | { |
162 | if (urb_context->skb != NULL) { | 162 | dev_kfree_skb(urb_context->skb); |
163 | dev_kfree_skb(urb_context->skb); | 163 | urb_context->skb = NULL; |
164 | urb_context->skb = NULL; | ||
165 | } | ||
166 | 164 | ||
167 | ath6kl_usb_free_urb_to_pipe(urb_context->pipe, urb_context); | 165 | ath6kl_usb_free_urb_to_pipe(urb_context->pipe, urb_context); |
168 | } | 166 | } |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index 55ccf9770339..f4ef6a724e4c 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c | |||
@@ -2481,16 +2481,11 @@ static int ath6kl_wmi_sync_point(struct wmi *wmi, u8 if_idx) | |||
2481 | 2481 | ||
2482 | free_cmd_skb: | 2482 | free_cmd_skb: |
2483 | /* free up any resources left over (possibly due to an error) */ | 2483 | /* free up any resources left over (possibly due to an error) */ |
2484 | if (skb) | 2484 | dev_kfree_skb(skb); |
2485 | dev_kfree_skb(skb); | ||
2486 | 2485 | ||
2487 | free_data_skb: | 2486 | free_data_skb: |
2488 | for (index = 0; index < num_pri_streams; index++) { | 2487 | for (index = 0; index < num_pri_streams; index++) |
2489 | if (data_sync_bufs[index].skb != NULL) { | 2488 | dev_kfree_skb((struct sk_buff *)data_sync_bufs[index].skb); |
2490 | dev_kfree_skb((struct sk_buff *)data_sync_bufs[index]. | ||
2491 | skb); | ||
2492 | } | ||
2493 | } | ||
2494 | 2489 | ||
2495 | return ret; | 2490 | return ret; |
2496 | } | 2491 | } |