Linux-ARM-MSM Archive on
 help / color / Atom feed
* [PATCH] msm: adreno: no need to check return value of debugfs_create functions
@ 2019-06-13 12:22 Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2019-06-13 12:22 UTC (permalink / raw)
  To: Rob Clark, Sean Paul, David Airlie, Daniel Vetter, Jordan Crouse,
	Mamta Shukla, Thomas Zimmermann
  Cc: linux-arm-msm, dri-devel, freedreno

When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Rob Clark <>
Cc: Sean Paul <>
Cc: David Airlie <>
Cc: Daniel Vetter <>
Cc: Jordan Crouse <>
Cc: Mamta Shukla <>
Cc: Thomas Zimmermann <>
Signed-off-by: Greg Kroah-Hartman <>
 drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c b/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
index d9af3aff690f..cb8dfc970ec3 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
@@ -158,7 +158,6 @@ DEFINE_SIMPLE_ATTRIBUTE(reset_fops, NULL, reset_set, "%llx\n");
 int a5xx_debugfs_init(struct msm_gpu *gpu, struct drm_minor *minor)
 	struct drm_device *dev;
-	struct dentry *ent;
 	int ret;
 	if (!minor)
@@ -175,11 +174,8 @@ int a5xx_debugfs_init(struct msm_gpu *gpu, struct drm_minor *minor)
 		return ret;
-	ent = debugfs_create_file("reset", S_IWUGO,
-		minor->debugfs_root,
-		dev, &reset_fops);
-	if (!ent)
-		return -ENOMEM;
+	debugfs_create_file("reset", S_IWUGO, minor->debugfs_root, dev,
+			    &reset_fops);
 	return 0;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-13 12:22 [PATCH] msm: adreno: no need to check return value of debugfs_create functions Greg Kroah-Hartman

Linux-ARM-MSM Archive on

Archives are clonable:
	git clone --mirror linux-arm-msm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-msm linux-arm-msm/ \
	public-inbox-index linux-arm-msm

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox