From patchwork Mon Jul 12 06:12:13 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: 472999 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2688764jao; Mon, 12 Jul 2021 00:32:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTVrhukgJ+0S/dRSbEtk8DgFIP0tg8ktvD7oT7zi7PgYQ/l45I1fusSBi8+hApDsbH/Z6d X-Received: by 2002:aa7:c58e:: with SMTP id g14mr12030771edq.210.1626075160424; Mon, 12 Jul 2021 00:32:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626075160; cv=none; d=google.com; s=arc-20160816; b=lv2UHZuEX+bu6hSRAbJ9qNMxtI883JB5dKMvASeJkZ4mul8/88ZqESljIIu3wtXzea j23eECLx9+4XJAeFVoyZUw8jIwFHehxH9PEeDHoAtEmIKilTxkv/pE/gQFO869gDWmJz f+03k87xOnEnBpa8ekboPBN8UwBdR3ZFq+FjXDG6daVNWBExS9JszLP33YQztVvWVAvt o/+77MYbgjnLjYHC35yQ63dCmNjeo4qbv/jHt9fIEB6eglPcyAl9iVWkczR5KOHoLUnM UcrMeP+qo+w26+nweHkZksBQRkSio4bbxhVmT9U13rM1q/Wji8MeU2VX9w8sHECA1Z5X UyLw== 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=nxaJX3eHKaVIN+cRw0XWRDdlNYjtmHKxCrqATZbS53A=; b=N+sJckAIc4gLENGTGxzzn9M3tdgBrOq72J/TIV0K2ycGJyJbf9NCcTbCfGs4u7M/8g r+sgRvp2XJyqfo8KFXRsX55sethHN4/w+xL7zFL2GQDvGeRr+ZrGznrkCgQuwJGq6dW8 nLE9rpfxS8mHl3q/0A/18U7czf3Pb8rMzoLafHtCM/uPuFMYFrVdtnP3QHb2fZUKoPMO MJ0E9zZ4SJGJcQ7TO7+Vr0xOxm5vVcBGMF5ggTSDNZNau+qmAmEa3FaT1egAyNiK5rWX SgAUFSf/YQk1JKjVNDmNgl3qZ+6erXCuIk5t/FDZiS4E7umqKz+J8pYQlANreO0zbzA4 dZiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0F3IAnmL; 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 e9si16596658edv.146.2021.07.12.00.32.40; Mon, 12 Jul 2021 00:32:40 -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=0F3IAnmL; 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 S242545AbhGLHdA (ORCPT + 12 others); Mon, 12 Jul 2021 03:33:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:43510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343584AbhGLH2g (ORCPT ); Mon, 12 Jul 2021 03:28:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D827A6127C; Mon, 12 Jul 2021 07:24:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626074648; bh=wpxCS1/3GvN2YASU2eStpfTsM2QfVP03V9ChL91BU10=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0F3IAnmLdqilsvsy/9X3kJl6TnkuDRRAXeXreFn/nTiwie+1kVd0E6PXTOLOrardm HXeJ66XpU0v9RxsbPtOwBZskgnYKaTRBrhnGY5+JzTy48+HUGxcoJww6NbG+yQfnTu QOX3Y8AvKHlki15J+D2dpNED9z40CVA9lCnpnQus= 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.12 650/700] leds: as3645a: Fix error return code in as3645a_parse_node() Date: Mon, 12 Jul 2021 08:12:13 +0200 Message-Id: <20210712061045.016392079@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060924.797321836@linuxfoundation.org> References: <20210712060924.797321836@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 e8922fa03379..80411d41e802 100644 --- a/drivers/leds/leds-as3645a.c +++ b/drivers/leds/leds-as3645a.c @@ -545,6 +545,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; }