소스 검색

[TIPC]: Added missing warning for out-of-memory condition

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Allan Stephens 19 년 전
부모
커밋
a75bf87427
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      net/tipc/port.c

+ 1 - 0
net/tipc/port.c

@@ -1061,6 +1061,7 @@ int tipc_createport(u32 user_ref,
 
 
 	up_ptr = (struct user_port *)kmalloc(sizeof(*up_ptr), GFP_ATOMIC);
 	up_ptr = (struct user_port *)kmalloc(sizeof(*up_ptr), GFP_ATOMIC);
 	if (up_ptr == NULL) {
 	if (up_ptr == NULL) {
+		warn("Port creation failed, no memory\n");
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 	ref = tipc_createport_raw(NULL, port_dispatcher, port_wakeup, importance);
 	ref = tipc_createport_raw(NULL, port_dispatcher, port_wakeup, importance);