From patchwork Sat May 15 03:06:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 439426 Delivered-To: patch@linaro.org Received: by 2002:a02:b78d:0:0:0:0:0 with SMTP id f13csp848799jam; Fri, 14 May 2021 20:07:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzevthmA+qYNZ08mzH6x81UG7+slMiH/G2i/BHDKL8W1zyLDH1IqxkUDuPr5MjtX3COaoGV X-Received: by 2002:aa7:d893:: with SMTP id u19mr14678652edq.258.1621048024140; Fri, 14 May 2021 20:07:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621048024; cv=none; d=google.com; s=arc-20160816; b=OjSPAHWrid8pu3XEvXxQRfNYZer+qmotLzB0bFYtVxQ72e9O1hAJhki5ozh6X7Zr/s v7lru01/l2l+YUoywTjDDRTKcyYdxDBwE7aOKHGBk/EGRUXCJuLvtPm8oI3YI7SYDb3t yiREn/8Cs18tMhId3IrBp9A2dsbu0X1jhogROYZ5f5VsbbbvAZimePuf5eb257uFElwb mbBmfteTWL8v/QI3I3cpY03cd9Ays4lbKTDBhcM+BnWDqrnadAT2/khQEAh43gGdoFjZ Hxzhal3rn5F7GI/laUnStz/Z6KTTz56VWxQsC1QjIHEEXpNaY+NGtQg5o6Zclt91LvzI QMWg== 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 :message-id:date:subject:cc:to:from; bh=rF+BbmBEmhQjCJY9aTmNpYsvbrd9k6VLbLctS2NAt40=; b=o0jqCtrr+E/ZvpHIUW4VQH1AEVJFYa7wCsRKzOOu2Pyrx0M4FSDrGwA0rrwvhsp07y g2lVVkY4vhMi9qySVaIRdL58qbTiyTBhBCIsTJCiFLkgSCbpnUsqXc1smWRoLxMHVW+U I+2h8yBYmsUctTwW/KJuc8hfyHqM40kgH3Nuhc+xQB6UucNIJdSkTJn1ylHaE9AKkMj9 vZ0IKH/9oTKBR9QXqvJOBr9YMqbsDwgnHfKzG9VmwfPct7xRDpuWAFvu2h+GLUY4pNB/ XrDVg47ACgBsiL9qok78gHboOeZW2ykjouZfWQFAlMRjFWlqtvL4UCEw/wH2mHVw4uzn KdhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-leds-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hh21si7864925ejb.473.2021.05.14.20.07.03 for ; Fri, 14 May 2021 20:07:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-leds-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-leds-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234182AbhEODIM (ORCPT ); Fri, 14 May 2021 23:08:12 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3689 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230371AbhEODIM (ORCPT ); Fri, 14 May 2021 23:08:12 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FhqxD0yxsz1BMMr; Sat, 15 May 2021 11:04:16 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.498.0; Sat, 15 May 2021 11:06:52 +0800 From: Zhen Lei To: Sakari Ailus , Pavel Machek , Mauro Carvalho Chehab , Jacek Anaszewski , linux-leds CC: Zhen Lei Subject: [PATCH 1/1] leds: as3645a: Fix error return code in as3645a_parse_node() Date: Sat, 15 May 2021 11:06:46 +0800 Message-ID: <20210515030646.6877-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org 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 Signed-off-by: Zhen Lei --- drivers/leds/leds-as3645a.c | 1 + 1 file changed, 1 insertion(+) -- 2.26.0.106.g9fadedd Acked-by: Sakari Ailus diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c index e8922fa03379620..80411d41e802d46 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; }