summaryrefslogtreecommitdiffstats
path: root/drivers/atm/iphase.c
diff options
context:
space:
mode:
authorTillmann Heidsieck <theidsieck@leenox.de>2015-10-10 21:47:18 +0200
committerDavid S. Miller <davem@davemloft.net>2015-10-12 19:56:26 -0700
commit21e26ff993dea9dceaf0f19cfec4bef58387b0f2 (patch)
treebf9fe0215bbe80eeb72d59ed7416229127e75d82 /drivers/atm/iphase.c
parent8c5b83f0f255542b40a1273c32eb067ec00bb2b2 (diff)
downloadlinux-21e26ff993dea9dceaf0f19cfec4bef58387b0f2.tar.bz2
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: Tillmann Heidsieck <theidsieck@leenox.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm/iphase.c')
-rw-r--r--drivers/atm/iphase.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index 65e65903faa0..d5010d7a99c3 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -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)