ath6kl: replace GFP_ATOMIC with GFP_KERNEL in ath6kl_bmi_init()
ath6kl_bmi_init() is never called in atomic context. It calls kzalloc() with GFP_ATOMIC, which is not necessary. GFP_ATOMIC can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
3f25911158
commit
bfc55fe659
|
@ -534,7 +534,7 @@ int ath6kl_bmi_init(struct ath6kl *ar)
|
|||
/* cmd + addr + len + data_size */
|
||||
ar->bmi.max_cmd_size = ar->bmi.max_data_size + (sizeof(u32) * 3);
|
||||
|
||||
ar->bmi.cmd_buf = kzalloc(ar->bmi.max_cmd_size, GFP_ATOMIC);
|
||||
ar->bmi.cmd_buf = kzalloc(ar->bmi.max_cmd_size, GFP_KERNEL);
|
||||
if (!ar->bmi.cmd_buf)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
Loading…
Reference in New Issue