소스 검색

isdn: hisax: callc: Replace GFP_ATOMIC with GFP_KERNEL in init_PStack()

init_PStack() is never called in atomic context.
It calls kmalloc() 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: David S. Miller <davem@davemloft.net>
Jia-Ju Bai 7 년 전
부모
커밋
87935aa776
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/isdn/hisax/callc.c

+ 1 - 1
drivers/isdn/hisax/callc.c

@@ -1012,7 +1012,7 @@ dummy_pstack(struct PStack *st, int pr, void *arg) {
 
 
 static int
 static int
 init_PStack(struct PStack **stp) {
 init_PStack(struct PStack **stp) {
-	*stp = kmalloc(sizeof(struct PStack), GFP_ATOMIC);
+	*stp = kmalloc(sizeof(struct PStack), GFP_KERNEL);
 	if (!*stp)
 	if (!*stp)
 		return -ENOMEM;
 		return -ENOMEM;
 	(*stp)->next = NULL;
 	(*stp)->next = NULL;