[PATCH AUTOSEL for 4.4 059/101] staging: wilc1000: fix unchecked return value

2018-03-07 Thread Sasha Levin
From: Pan Bian [ Upstream commit 9e96652756ad647b7bcc03cb99ffc9756d7b5f93 ] Function dev_alloc_skb() will return a NULL pointer if there is no enough memory. However, in function WILC_WFI_mon_xmit(), its return value is used without validation. This may result in a bad

[PATCH AUTOSEL for 4.4 059/101] staging: wilc1000: fix unchecked return value

2018-03-07 Thread Sasha Levin
From: Pan Bian [ Upstream commit 9e96652756ad647b7bcc03cb99ffc9756d7b5f93 ] Function dev_alloc_skb() will return a NULL pointer if there is no enough memory. However, in function WILC_WFI_mon_xmit(), its return value is used without validation. This may result in a bad memory access bug. This