All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remoteproc: Fix NULL vs IS_ERR() checking in rproc_create_trace_file
@ 2021-12-27  9:06 Miaoqian Lin
  2022-01-04 17:46 ` Mathieu Poirier
  0 siblings, 1 reply; 9+ messages in thread
From: Miaoqian Lin @ 2021-12-27  9:06 UTC (permalink / raw)
  Cc: linmq006, Ohad Ben-Cohen, Bjorn Andersson, Mathieu Poirier,
	linux-remoteproc, linux-kernel

The debugfs_create_file() function doesn't return NULL.
It returns error pointers.

Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 drivers/remoteproc/remoteproc_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c
index b5a1e3b697d9..a2409fe2f57b 100644
--- a/drivers/remoteproc/remoteproc_debugfs.c
+++ b/drivers/remoteproc/remoteproc_debugfs.c
@@ -390,7 +390,7 @@ struct dentry *rproc_create_trace_file(const char *name, struct rproc *rproc,
 
 	tfile = debugfs_create_file(name, 0400, rproc->dbg_dir, trace,
 				    &trace_rproc_ops);
-	if (!tfile) {
+	if (IS_ERR(tfile)) {
 		dev_err(&rproc->dev, "failed to create debugfs trace entry\n");
 		return NULL;
 	}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-01-20 20:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-27  9:06 [PATCH] remoteproc: Fix NULL vs IS_ERR() checking in rproc_create_trace_file Miaoqian Lin
2022-01-04 17:46 ` Mathieu Poirier
2022-01-05  6:42   ` [PATCH v2] " Miaoqian Lin
2022-01-05 13:10     ` [PATCH v3] " Miaoqian Lin
2022-01-17 17:06       ` Mathieu Poirier
2022-01-17 22:31         ` Bjorn Andersson
2022-01-18 16:56           ` Mathieu Poirier
2022-01-18 19:17             ` Bjorn Andersson
2022-01-20 20:05               ` Mathieu Poirier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.