All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: "Marek Behún" <kabel@kernel.org>, "Pavel Machek" <pavel@ucw.cz>,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	letux-kernel@openphoenux.org, NeilBrown <neilb@suse.de>,
	"Linus Walleij" <linus.walleij@linaro.org>
Subject: Re: [PATCH] leds: tca6507: fix error handling of using fwnode_property_read_string
Date: Wed, 5 Apr 2023 16:29:08 +0100	[thread overview]
Message-ID: <20230405152908.GQ8371@google.com> (raw)
In-Reply-To: <cbae7617db83113de726fcc423a805ebaa1bfca6.1680433978.git.hns@goldelico.com>

On Sun, 02 Apr 2023, H. Nikolaus Schaller wrote:

> Commit 96f524105b9c ("leds: tca6507: use fwnode API instead of OF")
>
> changed to fwnode API but did not take into account that a missing property
> "linux,default-trigger" now seems to return an error and as a side effect
> sets value to -1. This seems to be different from of_get_property() which
> always returned NULL in any case of error.
>
> Neglecting this side-effect leads to
>
> [   11.201965] Unable to handle kernel paging request at virtual address ffffffff when read
>
> in the strcmp() of led_trigger_set_default() if there is no led-trigger
> defined in the DTS.
>
> I don't know if this was recently introduced somewhere in the fwnode lib
> or if the effect was missed in initial testing. Anyways it seems to be a
> bug to ignore the error return value of an optional value here in the
> driver.
>
> Fixes: 96f524105b9c ("leds: tca6507: use fwnode API instead of OF")
> Cc: Marek Behún <kabel@kernel.org>
> Cc: NeilBrown <neilb@suse.de>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
>  drivers/leds/leds-tca6507.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Applied, thanks

--
Lee Jones [李琼斯]

      parent reply	other threads:[~2023-04-05 15:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-02 11:12 [PATCH] leds: tca6507: fix error handling of using fwnode_property_read_string H. Nikolaus Schaller
2023-04-03  9:09 ` Marek Behún
2023-04-03 15:23 ` Pavel Machek
2023-04-05 15:29 ` Lee Jones [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=20230405152908.GQ8371@google.com \
    --to=lee@kernel.org \
    --cc=hns@goldelico.com \
    --cc=kabel@kernel.org \
    --cc=letux-kernel@openphoenux.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=pavel@ucw.cz \
    /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.