kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Robert Marko <robert.marko@sartura.hr>,
	Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] hwmon: (pmbus/dps920ab) Delete some dead code
Date: Fri, 18 Jun 2021 12:47:04 -0700	[thread overview]
Message-ID: <20210618194704.GC1664689@roeck-us.net> (raw)
In-Reply-To: <YMyjmR54ErLtc1sH@mwanda>

On Fri, Jun 18, 2021 at 04:46:01PM +0300, Dan Carpenter wrote:
> The debugfs_create_dir() function returns error pointers, it doesn't
> return NULL.  But debugfs functions don't need to be checked in normal
> situations and we can just delete this code.
> 
> Fixes: 1f442e213ce5 ("hwmon: (pmbus) Add driver for Delta DPS-920AB PSU")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/pmbus/dps920ab.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/hwmon/pmbus/dps920ab.c b/drivers/hwmon/pmbus/dps920ab.c
> index bd2df2a3c8e3..d3941f6eb29a 100644
> --- a/drivers/hwmon/pmbus/dps920ab.c
> +++ b/drivers/hwmon/pmbus/dps920ab.c
> @@ -119,8 +119,6 @@ static void dps920ab_init_debugfs(struct dps920ab_data *data, struct i2c_client
>  		return;
>  
>  	debugfs_dir = debugfs_create_dir(client->name, root);
> -	if (!debugfs_dir)
> -		return;
>  
>  	debugfs_create_file("mfr_id",
>  			    0400,
> -- 
> 2.30.2
> 

      reply	other threads:[~2021-06-18 19:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 13:46 [PATCH] hwmon: (pmbus/dps920ab) Delete some dead code Dan Carpenter
2021-06-18 19:47 ` Guenter Roeck [this message]

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=20210618194704.GC1664689@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=dan.carpenter@oracle.com \
    --cc=jdelvare@suse.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=robert.marko@sartura.hr \
    /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).