Drop unneeded lines by moving skb data in both main and 10x WMI pull service ready event operations. Signed-off-by: Tomislav Požega <pozega.tomislav@xxxxxxxxx> --- drivers/net/wireless/ath/ath10k/wmi.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 59d2d2a..8ab178c 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -5345,13 +5345,12 @@ static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id, ath10k_wmi_main_op_pull_svc_rdy_ev(struct ath10k *ar, struct sk_buff *skb, struct wmi_svc_rdy_ev_arg *arg) { - struct wmi_service_ready_event *ev; + struct wmi_service_ready_event *ev = (void *)skb->data; size_t i, n; if (skb->len < sizeof(*ev)) return -EPROTO; - ev = (void *)skb->data; skb_pull(skb, sizeof(*ev)); arg->min_tx_power = ev->hw_min_tx_power; arg->max_tx_power = ev->hw_max_tx_power; @@ -5387,13 +5386,12 @@ static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id, ath10k_wmi_10x_op_pull_svc_rdy_ev(struct ath10k *ar, struct sk_buff *skb, struct wmi_svc_rdy_ev_arg *arg) { - struct wmi_10x_service_ready_event *ev; + struct wmi_10x_service_ready_event *ev = (void *)skb->data; int i, n; if (skb->len < sizeof(*ev)) return -EPROTO; - ev = (void *)skb->data; skb_pull(skb, sizeof(*ev)); arg->min_tx_power = ev->hw_min_tx_power; arg->max_tx_power = ev->hw_max_tx_power; -- 1.7.0.4