Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1247983 > unrolled thread
| Started by | Insu Yun <wuninsu@gmail.com> |
|---|---|
| First post | 2015-10-15 18:30 +0200 |
| Last post | 2015-10-16 08:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] mlx4: corretly check failed allocation Insu Yun <wuninsu@gmail.com> - 2015-10-15 18:30 +0200
Re: [PATCH] mlx4: corretly check failed allocation David Miller <davem@davemloft.net> - 2015-10-16 08:20 +0200
| From | Insu Yun <wuninsu@gmail.com> |
|---|---|
| Date | 2015-10-15 18:30 +0200 |
| Subject | [PATCH] mlx4: corretly check failed allocation |
| Message-ID | <qjTzJ-3md-47@gated-at.bofh.it> |
When allocation fails, mlx4_alloc_cmd_mailbox returns -ENOMEM.
Since there is no case that mlx4_alloc_cmd_mailbox returns NULL,
it needs to be checked by IS_ERR, not IS_ERR_OR_NULL
Signed-off-by: Insu Yun <wuninsu@gmail.com>
---
drivers/net/ethernet/mellanox/mlx4/mr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/mr.c b/drivers/net/ethernet/mellanox/mlx4/mr.c
index 78f51e1..9319519 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mr.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mr.c
@@ -318,7 +318,7 @@ int mlx4_mr_hw_get_mpt(struct mlx4_dev *dev, struct mlx4_mr *mmr,
key, NULL);
} else {
mailbox = mlx4_alloc_cmd_mailbox(dev);
- if (IS_ERR_OR_NULL(mailbox))
+ if (IS_ERR(mailbox))
return PTR_ERR(mailbox);
err = mlx4_cmd_box(dev, 0, mailbox->dma, key,
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2015-10-16 08:20 +0200 |
| Message-ID | <qk6wW-610-19@gated-at.bofh.it> |
| In reply to | #1247983 |
From: Insu Yun <wuninsu@gmail.com> Date: Thu, 15 Oct 2015 12:24:09 -0400 > When allocation fails, mlx4_alloc_cmd_mailbox returns -ENOMEM. > Since there is no case that mlx4_alloc_cmd_mailbox returns NULL, > it needs to be checked by IS_ERR, not IS_ERR_OR_NULL > > Signed-off-by: Insu Yun <wuninsu@gmail.com> Applied to net-next, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web