Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1273801

[PATCH] misc: mic: ERR_PTR expects -Exxx

From Rasmus Villemoes <linux@rasmusvillemoes.dk>
Newsgroups linux.kernel
Subject [PATCH] misc: mic: ERR_PTR expects -Exxx
Date 2015-11-20 09:20 +0100
Message-ID <qwP5g-4EO-19@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


These wouldn't be recognized by IS_ERR. There's no actual harm done,
since the only caller ignores the return value.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 drivers/misc/mic/scif/scif_dma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/mic/scif/scif_dma.c b/drivers/misc/mic/scif/scif_dma.c
index 95a13c629a8e..f998daad1993 100644
--- a/drivers/misc/mic/scif/scif_dma.c
+++ b/drivers/misc/mic/scif/scif_dma.c
@@ -293,13 +293,13 @@ scif_add_mmu_notifier(struct mm_struct *mm, struct scif_endpt *ep)
 		 = kzalloc(sizeof(*mmn), GFP_KERNEL);
 
 	if (!mmn)
-		return ERR_PTR(ENOMEM);
+		return ERR_PTR(-ENOMEM);
 
 	scif_init_mmu_notifier(mmn, current->mm, ep);
 	if (mmu_notifier_register(&mmn->ep_mmu_notifier,
 				  current->mm)) {
 		kfree(mmn);
-		return ERR_PTR(EBUSY);
+		return ERR_PTR(-EBUSY);
 	}
 	list_add(&mmn->list, &ep->rma_info.mmn_list);
 	return mmn;
-- 
2.6.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/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] misc: mic: ERR_PTR expects -Exxx Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-11-20 09:20 +0100

csiph-web