All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liviu Dudau <liviu.dudau@arm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	"James (Qian) Wang" <james.qian.wang@arm.com>
Subject: Re: [PATCH] komeda: no need to check return value of debugfs_create functions
Date: Thu, 13 Jun 2019 15:48:46 +0100	[thread overview]
Message-ID: <20190613144846.GO4173@e110455-lin.cambridge.arm.com> (raw)
In-Reply-To: <20190613132806.GA4863@kroah.com>

On Thu, Jun 13, 2019 at 03:28:06PM +0200, Greg Kroah-Hartman wrote:
> 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: "James (Qian) Wang" <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Brian Starkey <brian.starkey@arm.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

Thanks for the patch, I'll pull it into malidp tree (shared with komeda).

Best regards,
Liviu

> ---
>  drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> index ca3599e4a4d3..58100edf58fa 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> @@ -51,9 +51,6 @@ static void komeda_debugfs_init(struct komeda_dev *mdev)
>  		return;
>  
>  	mdev->debugfs_root = debugfs_create_dir("komeda", NULL);
> -	if (IS_ERR_OR_NULL(mdev->debugfs_root))
> -		return;
> -
>  	debugfs_create_file("register", 0444, mdev->debugfs_root,
>  			    mdev, &komeda_register_fops);
>  }
> -- 
> 2.22.0
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-06-13 14:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-13 13:28 [PATCH] komeda: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2019-06-13 14:48 ` Liviu Dudau [this message]
2019-06-14 10:25 ` james qian wang (Arm Technology China)

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=20190613144846.GO4173@e110455-lin.cambridge.arm.com \
    --to=liviu.dudau@arm.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=james.qian.wang@arm.com \
    /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 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.