From patchwork Mon Jul 12 06:11:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 472857 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2647822jao; Sun, 11 Jul 2021 23:29:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6q+BkYpWef2T1hcF17vttEglAJdeZ+SRnP08LZ0SuyjqQz9c+KupaxO2YgaqFtUpux1KS X-Received: by 2002:a05:6402:20e:: with SMTP id t14mr61689470edv.193.1626071387731; Sun, 11 Jul 2021 23:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626071387; cv=none; d=google.com; s=arc-20160816; b=fqUQY38eyWb7mtTiCBOxCV2w8vhNoeJhCgwSkEBKGw++/EZHfIFddESsCTo/YrhQ6O 3T29+pNarQ81ZD45ce9IOBkqUk0qNYKX7YHMNJyepMDTHjMjlzdFZ5Kf6IiaOt/T4lSp 6buRebdyUV1SoqXCy8ZN7C5kFcfXuE179LrfovG7RRhk9v0Y1L5LUeZWtCn0ynD4zZMd SCu2Bdx1mrHfW/aqOMTznN3Oe7HzlW241MJFcLtolDyJ+eqc3m26blWT6sD6+/Ho9Zt5 5egHYFYx7y6flfz3XWmA+PNEccH6BoSZjYSBX/cgd+TNupgF2xUloBsxudDX3dTcwZSu TPjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OyRlj5KxMoOGHJ3O2KIjNIW7lc8/gdvv5cU8gdcrgpo=; b=dGJiqvVqe33JkGENF/BOSJx3tTEdD6uJMdxjvq/G2/nexajb0pctKFB2y3wfKHIYuc EPlU2/o48Zh6fzq7jerVw2Xz3R1bu+O+IGMRf2q+vfSjh5j2Mw++WQX/eM9d5jPuSYy9 nahZjkDGzIu4036lU6tugFfNu8FfeZUsovhIX/PZzwGUoA8s4Lc8KfxUCiz+YdLPYP7x EQP7pu/LT28m/AQ4fukMRtjRKDh7pYfs77jdgE06NlMP04qT+ystTAZ+Y/hNAHcEoFq6 tvikFEZPxJ3LyWaGwkHBJ4LfYguaracmYtoggvyID4RWH1DoDY7UFiytLcy6bYflyGLR qJ+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ro1E37zk; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bz6si16420285ejc.610.2021.07.11.23.29.47; Sun, 11 Jul 2021 23:29:47 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ro1E37zk; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237027AbhGLGc2 (ORCPT + 12 others); Mon, 12 Jul 2021 02:32:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:52538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236358AbhGLGaI (ORCPT ); Mon, 12 Jul 2021 02:30:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9561D610CA; Mon, 12 Jul 2021 06:27:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626071240; bh=M+fhfkjO6C7Q1lGEs62/Nzv5O3CTqiiMHhNwvJUOn7I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ro1E37zksLbDqTmY2vEXgKDfYcqO+NAoDYBN6dJh1yCU81X9x4G5fmr1xVswYVKLW XwRJKkHjRdGu48Hsldp3XoNFIZ+EdLaPYcJMk3IancyMduyW7+fb5o52f7PjQfEVxh s0O3ML6Z+IDe18v8lFJC8s4KQXKCapb2uRJbV68k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Sakari Ailus , Zhen Lei , Pavel Machek , Sasha Levin Subject: [PATCH 5.4 333/348] leds: as3645a: Fix error return code in as3645a_parse_node() Date: Mon, 12 Jul 2021 08:11:57 +0200 Message-Id: <20210712060748.317947156@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060659.886176320@linuxfoundation.org> References: <20210712060659.886176320@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhen Lei [ Upstream commit 96a30960a2c5246c8ffebe8a3c9031f9df094d97 ] Return error code -ENODEV rather than '0' when the indicator node can not be found. Fixes: a56ba8fbcb55 ("media: leds: as3645a: Add LED flash class driver") Reported-by: Hulk Robot Acked-by: Sakari Ailus Signed-off-by: Zhen Lei Signed-off-by: Pavel Machek Signed-off-by: Sasha Levin --- drivers/leds/leds-as3645a.c | 1 + 1 file changed, 1 insertion(+) -- 2.30.2 diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c index b7e0ae1af8fa..1dc6f1b24ddb 100644 --- a/drivers/leds/leds-as3645a.c +++ b/drivers/leds/leds-as3645a.c @@ -544,6 +544,7 @@ static int as3645a_parse_node(struct as3645a *flash, if (!flash->indicator_node) { dev_warn(&flash->client->dev, "can't find indicator node\n"); + rval = -ENODEV; goto out_err; }