From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3BE0C76188 for ; Wed, 5 Apr 2023 15:29:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238118AbjDEP3h (ORCPT ); Wed, 5 Apr 2023 11:29:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238021AbjDEP3e (ORCPT ); Wed, 5 Apr 2023 11:29:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29CF13C3E; Wed, 5 Apr 2023 08:29:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 967136278C; Wed, 5 Apr 2023 15:29:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49B17C433EF; Wed, 5 Apr 2023 15:29:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680708554; bh=yqnI4bfV+iMcBOW/rXJz9gFWpPoAAXioww5cW7GdyGo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mBwOpwsIznolYBOaJKQGDS8F7spcBNnpZuZgQIqJPk2CgpJylX5ERxDRkL4uEC0Me j0XvUPH3BrZAtRj5x7dHIDh5+YjLUEqfTkfFBO3dXnURIay54Q3EPZQnXnG/Qoa539 wjUBqjwrHq8aRxKr9Vgmr0e/jaQJSXMBQICJJ6m8KwgjAqMuy900EZ4KdvkriyyKP/ REPXidnrcIUt698TkoVm9sOb5jwh7PKoSRrLkTAbJwAjhvRYnQNtXY2+HC7V8mg0lP +bVmorJBmV6qyYkek3atRoH+fc4TfAKL6I7c4yaexvwZtJHz5nCkKh7OflJrdlO4cx BIJMevI3i+VXQ== Date: Wed, 5 Apr 2023 16:29:08 +0100 From: Lee Jones To: "H. Nikolaus Schaller" Cc: Marek =?iso-8859-1?Q?Beh=FAn?= , Pavel Machek , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, NeilBrown , Linus Walleij Subject: Re: [PATCH] leds: tca6507: fix error handling of using fwnode_property_read_string Message-ID: <20230405152908.GQ8371@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org 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 > Cc: NeilBrown > Cc: Linus Walleij > Signed-off-by: H. Nikolaus Schaller > --- > drivers/leds/leds-tca6507.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Applied, thanks -- Lee Jones [李琼斯]