From: Pan Bian <bianpan201602@163.com>
To: Fabien Dessenne <fabien.dessenne@st.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Pan Bian <bianpan2016@163.com>
Subject: [PATCH 1/1] media: platform: sti: return -ENOMEM on errors
Date: Sat, 3 Dec 2016 20:39:33 +0800 [thread overview]
Message-ID: <1480768773-5926-1-git-send-email-bianpan201602@163.com> (raw)
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
reply other threads:[~2016-12-03 12:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1480768773-5926-1-git-send-email-bianpan201602@163.com \
--to=bianpan201602@163.com \
--cc=bianpan2016@163.com \
--cc=fabien.dessenne@st.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).