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


Groups > linux.kernel > #1535385 > unrolled thread

[PATCH 1/1] media: platform: sti: return -ENOMEM on errors

Started byPan Bian <bianpan201602@163.com>
First post2016-12-03 13:50 +0100
Last post2016-12-03 13:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] media: platform: sti: return -ENOMEM on errors Pan Bian <bianpan201602@163.com> - 2016-12-03 13:50 +0100

#1535385 — [PATCH 1/1] media: platform: sti: return -ENOMEM on errors

FromPan Bian <bianpan201602@163.com>
Date2016-12-03 13:50 +0100
Subject[PATCH 1/1] media: platform: sti: return -ENOMEM on errors
Message-ID<sKhVo-1bT-11@gated-at.bofh.it>
From: Pan Bian <bianpan2016@163.com>

Function bdisp_debugfs_create() returns 0 even on errors. So its caller
cannot detect the errors. It may be better to return "-ENOMEM" on the
exception paths.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188801

Signed-off-by: Pan Bian <bianpan2016@163.com>
---
 drivers/media/platform/sti/bdisp/bdisp-debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/sti/bdisp/bdisp-debug.c b/drivers/media/platform/sti/bdisp/bdisp-debug.c
index 79c5635..7af6686 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-debug.c
+++ b/drivers/media/platform/sti/bdisp/bdisp-debug.c
@@ -677,7 +677,7 @@ int bdisp_debugfs_create(struct bdisp_dev *bdisp)
 
 err:
 	bdisp_debugfs_remove(bdisp);
-	return 0;
+	return -ENOMEM;
 }
 
 void bdisp_debugfs_remove(struct bdisp_dev *bdisp)
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web