mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: hammer hsieh <hammerh0314@gmail.com>
Cc: linux-pwm@vger.kernel.org, wells.lu@sunplus.com,
	devicetree@vger.kernel.org,
	"hammer.hsieh" <hammer.hsieh@sunplus.com>,
	linux-kernel@vger.kernel.org, robh+dt@kernel.org,
	thierry.reding@gmail.com, kernel@pengutronix.de,
	lee.jones@linaro.org
Subject: Re: [PATCH v2 2/2] pwm:sunplus-pwm:Add Sunplus SoC PWM Driver
Date: Tue, 8 Mar 2022 16:44:29 +0100	[thread overview]
Message-ID: <20220308154429.ztv3l42euu2hf3ye@pengutronix.de> (raw)
In-Reply-To: <CAOX-t56F2u_1=tA4N4Wvicw-e9J4ksN__J70QZtjZwJRjgesUQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

Hello,

On Tue, Mar 08, 2022 at 08:03:55PM +0800, hammer hsieh wrote:
> > IMHO yes. (Though the most likely error -ENOMEM, in this case no error
> > message should be emitted.)
> >
> 
>  ok, will add error message like below.
>         if (ret < 0) {
>                 dev_err(dev, "failed to release clock: %d\n", ret);
>                 return ret;
>         }
> or should i modify like
>         if (ret < 0) {
>                 dev_err(dev, "failed to release clock: %d\n", ret);
>                 return ERR_PTR(ret);
>         }
> i didn't find reference code for it, not sure which one is better?

It depends if you return a pointer or an int. Also please make use of
%pe instead of %d for error codes to make it easier to understand.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2022-03-08 15:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04  6:20 [PATCH v2 0/2] Add PWM driver for Suplus SP7021 SoC Hammer Hsieh
2022-03-04  6:20 ` [PATCH v2 1/2] dt-bindings:pwm:Add bindings doc for Sunplus SoC PWM Driver Hammer Hsieh
2022-03-04 15:01   ` Krzysztof Kozlowski
2022-03-07  4:18     ` hammer hsieh
2022-03-07  7:51       ` Krzysztof Kozlowski
2022-03-04  6:20 ` [PATCH v2 2/2] pwm:sunplus-pwm:Add " Hammer Hsieh
2022-03-04 18:57   ` Uwe Kleine-König
2022-03-07 12:50     ` hammer hsieh
2022-03-07 13:10       ` Uwe Kleine-König
2022-03-08 12:03         ` hammer hsieh
2022-03-08 15:44           ` Uwe Kleine-König [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=20220308154429.ztv3l42euu2hf3ye@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=devicetree@vger.kernel.org \
    --cc=hammer.hsieh@sunplus.com \
    --cc=hammerh0314@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=wells.lu@sunplus.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

all inboxes | Powered by JetHome®