Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp853407rwl; Wed, 5 Apr 2023 08:31:52 -0700 (PDT) X-Google-Smtp-Source: AKy350ZTcFTVXIbgmyBRn5qXOEyvBN/EZXN4UDC3AaA+RDKwTR94zFRVbbnaASbCXsY4e2qbnBNn X-Received: by 2002:aa7:d898:0:b0:502:3ea3:fc24 with SMTP id u24-20020aa7d898000000b005023ea3fc24mr1738007edq.17.1680708712075; Wed, 05 Apr 2023 08:31:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680708712; cv=none; d=google.com; s=arc-20160816; b=0k4yhQ941eWyzYUf1u8s9z9bRkFPaPs8pSaeG5OVy6oolg9XkEoVpWd0rAYZccgXI5 5Dm9gPlfrmyizDxc0w3RS+IRwQ9I1u4R7W3g2PjYuK91horEoyeRKVfuuFb6HJ7EY72y y6Kc5P00VhGBpXxrhErSCyUgrz+ACCoIBMeUreo0pTpT7nKSBFMlZkV43IAFca5tBgvr 4wEPTwDw6T+TZfw6c2v102sTD1pKnE+Np5Ciu65/FiFfJXRGSWv9my6RbinNsvsDrMAX n3J72rrXKJOe0z6VC3smvB5t/Kxao7GJcKWUHils0S96YRvv9624FcQKudfM0T35Qxqf NOTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ezlpjL9wvXQ5+MihTtlVK/7+C1Wev1XiSDDuJ4AVDzQ=; b=jhNtOlEEYIHU5bJTCVTAINJjS20hyYPBwQlrVjd8bjBhp01UmW/I+PQR4MOyjeNjZm 0ig8otOqxonG37qADH3dVP0muLncvV4EiIJWF+0IHmqra1HTWADbsU+per/usKdUdCxj +NWWC4ll7Ovgrl6jrEfS6Z/q0NWQDXwPnD7C9HwCl0BSOL67u4NtzPEVxutNXk/dLtiN KQaFE9lsfBEgtYEyQ0OjMZ6zMcUi5Q5hRKj3gZ4TmehSWvBd8osbedsUdDQqpIlCObz4 KiTJ4wTtAIYFPKhJVROZUqK3t64S7emrVRQfzBIT2Fcj+sXnik/Zsg45hjwSeBIDwDny QfCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mBwOpwsI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c24-20020a056402101800b00502928d4c88si2800581edu.462.2023.04.05.08.31.20; Wed, 05 Apr 2023 08:31:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mBwOpwsI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237745AbjDEP3i (ORCPT + 99 others); Wed, 5 Apr 2023 11:29:38 -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: X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 [李琼斯]