From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>
Cc: bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org
Subject: Re: [PATCH] thermal: bcm2835: no need to check return value of debugfs_create functions
Date: Thu, 13 Jun 2019 22:18:13 +0200 [thread overview]
Message-ID: <b0e6c04d-143f-1b42-0536-028adc9a55a5@linaro.org> (raw)
In-Reply-To: <20190613183729.GA32085@kroah.com>
On 13/06/2019 20:37, 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.
Sorry if I'm missing some context but does it mean we do no longer take
care of roll-backing anything? It is acceptable to have half of the
debugfs set for example? Or a parent failing to create and the children
polluting the root debugfs dir because the parent is NULL?
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Eduardo Valentin <edubezval@gmail.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Ray Jui <rjui@broadcom.com>
> Cc: Scott Branden <sbranden@broadcom.com>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: linux-pm@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> drivers/thermal/broadcom/bcm2835_thermal.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c
> index ba39647a690c..3199977f1e73 100644
> --- a/drivers/thermal/broadcom/bcm2835_thermal.c
> +++ b/drivers/thermal/broadcom/bcm2835_thermal.c
> @@ -123,8 +123,6 @@ static void bcm2835_thermal_debugfs(struct platform_device *pdev)
> struct debugfs_regset32 *regset;
>
> data->debugfsdir = debugfs_create_dir("bcm2835_thermal", NULL);
> - if (!data->debugfsdir)
> - return;
>
> regset = devm_kzalloc(&pdev->dev, sizeof(*regset), GFP_KERNEL);
> if (!regset)
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2019-06-13 20:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 18:37 [PATCH] thermal: bcm2835: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2019-06-13 20:18 ` Daniel Lezcano [this message]
2019-06-14 5:05 ` Greg Kroah-Hartman
2019-06-14 6:49 ` Daniel Lezcano
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=b0e6c04d-143f-1b42-0536-028adc9a55a5@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=edubezval@gmail.com \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjui@broadcom.com \
--cc=rui.zhang@intel.com \
--cc=sbranden@broadcom.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 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).