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>
This commit is contained in:
parent
ebc5196e3e
commit
5ca63c62c0
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
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)
|
if (event_data == NULL)
|
||||||
return notifier_from_errno(-ENOMEM);
|
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:
|
case SERVREG_NOTIF_SERVICE_STATE_DOWN_V01:
|
||||||
icnss_pr_info("Service down, data: 0x%p, state: 0x%lx\n", data,
|
icnss_pr_info("Service down, data: 0x%p, state: 0x%lx\n", data,
|
||||||
priv->state);
|
priv->state);
|
||||||
event_data = kzalloc(sizeof(*data), GFP_KERNEL);
|
event_data = kzalloc(sizeof(*event_data), GFP_KERNEL);
|
||||||
|
|
||||||
if (event_data == NULL)
|
if (event_data == NULL)
|
||||||
return notifier_from_errno(-ENOMEM);
|
return notifier_from_errno(-ENOMEM);
|
||||||
|
|
Loading…
Add table
Reference in a new issue