diff options
| author | Prashanth Bhatta <bhattap@codeaurora.org> | 2017-01-18 16:58:37 -0800 |
|---|---|---|
| committer | Prashanth Bhatta <bhattap@codeaurora.org> | 2017-01-18 16:58:37 -0800 |
| commit | 5ca63c62c0948bb9ebe99def7f3bdeb1699ae4b2 (patch) | |
| tree | ec5d5a6753f2fb19e0937e88d076dd8c74ca54b0 /drivers/soc | |
| parent | ebc5196e3eb88a2f28ef461caacf62d4459477d8 (diff) | |
icnss: Use right variable in sizeof for allocation
While posting PD_SERVICE_DOWN indication to event queue, wrong
variable used in sizeof to allocate memory for event_data. Fix by
using event_data in sizeof to get the right memory size to be
allocated.
CRs-fixed: 1113172
Change-Id: I44c04cf7edd1f09e2275ec040ab99dc34a197cf8
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
Diffstat (limited to 'drivers/soc')
| -rw-r--r-- | drivers/soc/qcom/icnss.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/soc/qcom/icnss.c b/drivers/soc/qcom/icnss.c index 44d086656a12..d9ea9d94c3a4 100644 --- a/drivers/soc/qcom/icnss.c +++ b/drivers/soc/qcom/icnss.c @@ -2068,7 +2068,7 @@ static int icnss_modem_notifier_nb(struct notifier_block *nb, icnss_pr_info("Modem went down, state: %lx\n", priv->state); - event_data = kzalloc(sizeof(*data), GFP_KERNEL); + event_data = kzalloc(sizeof(*event_data), GFP_KERNEL); if (event_data == NULL) return notifier_from_errno(-ENOMEM); @@ -2143,7 +2143,7 @@ static int icnss_service_notifier_notify(struct notifier_block *nb, case SERVREG_NOTIF_SERVICE_STATE_DOWN_V01: icnss_pr_info("Service down, data: 0x%p, state: 0x%lx\n", data, priv->state); - event_data = kzalloc(sizeof(*data), GFP_KERNEL); + event_data = kzalloc(sizeof(*event_data), GFP_KERNEL); if (event_data == NULL) return notifier_from_errno(-ENOMEM); |
