提交 21e26ff9 编写于 作者: T Tillmann Heidsieck 提交者: David S. Miller

atm: iphase: return -ENOMEM instead of -1 in case of failed kmalloc()

Smatch complains about returning hard coded error codes, silence this
warning.

drivers/atm/iphase.c:115 ia_enque_rtn_q() warn: returning -1 instead of -ENOMEM is sloppy
Signed-off-by: NTillmann Heidsieck <theidsieck@leenox.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8c5b83f0
......@@ -112,7 +112,8 @@ static void ia_enque_head_rtn_q (IARTN_Q *que, IARTN_Q * data)
static int ia_enque_rtn_q (IARTN_Q *que, struct desc_tbl_t data) {
IARTN_Q *entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
if (!entry) return -1;
if (!entry)
return -ENOMEM;
entry->data = data;
entry->next = NULL;
if (que->next == NULL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册