Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp162518pxx; Wed, 28 Oct 2020 01:12:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjkfZFAr8FQagPkLVVsd2/8tPQLYT4RBO6exOIv63neP1MwPubwmVy7xEifgYQOQ/5TrkM X-Received: by 2002:a17:906:2a09:: with SMTP id j9mr6223082eje.355.1603872727447; Wed, 28 Oct 2020 01:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603872727; cv=none; d=google.com; s=arc-20160816; b=hqvzLLJvslWxjK28eXTQ/7x3Qr0abguGj5TsKxm0SRYGa5v81Am79aH8zQ74Osk61x /OmUm7G6HNtdBHhcL61bVH3zB8b9yjNDpgsfaqM92pc/OeLcZhqXmVZKqn5NOG15VxKl HzhMcu7uNL7BrD/6QWHu+ev5oFeO/QCwuifUeAn+QMsp7wGWVN+KeOji3xBmoAmgE47W /0LRbVw+wTVz7sO3DcIhfPlWc1n0VcehpKiosVLU00KjV4Dr1vUUPJ+gvnJ+709VhYwY XBit01WCyP7ovBb+qcSpah8SfmWeA2q5A0sQ0hU0ebt2sHFb8Vne+ShlwCicgBj2HEwH hEzw== 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=NlCYlZkrPMwbIB+3/eoeMRf5merbWy1ox0Aa+9ia120=; b=htQi9refp9QXBlLRuoxNPfX1iVxQF2VAr0y/6o8s/71FeJaWTggH7Fz4IGOOsn9rwy HiesilrpPXeqeyyCQNUlje/kmP6n0oy8FPK6+a418VYQ0wflPCL4fRfnGFiW/Dbg3ICq +wwY5U+fcZhGguPZDZDBNnupxRjBNZJiF0Rf2zrZQ59IvD7tnfk0V4DN2eZqYDZUgxKC 0oUloE124Cl88hVtNNycyZu/fQFgYrP7tAVgWlT6lhBVQJ4vdPvQVoKcxAXtjmh5G0So xmke8s7I8D502nFchyNlUP0IaYg6ljq3u+u2WchL4qg2ZCabpum+7Y/DmjbtqE21oHpg pqTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rG53Wd3E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (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 t1si2868715ejb.712.2020.10.28.01.11.45; Wed, 28 Oct 2020 01:12:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=default header.b=rG53Wd3E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753267AbgJ0N7b (ORCPT + 99 others); Tue, 27 Oct 2020 09:59:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:46822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753242AbgJ0N7V (ORCPT ); Tue, 27 Oct 2020 09:59:21 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2C904221F7; Tue, 27 Oct 2020 13:59:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807160; bh=TqZIMtcPRGxicGhzsyZKtIsWlsRediNHd8EMURjpfJ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rG53Wd3EnjrRm9m0tzuB9e5mUwCe3jHHgSVvT7uepbs2/yvsEg3Vd5u+2MtH4MUP9 DDUkKsNWADrOhU7l1FQdez7wiZhg9CNPq8AENrKSGO+t1378XpW7u/17P0v5g+jDk6 XWJ5k6v0x6DD1eHUwesgn/rF2XwulgmXSpwhQEvg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dinghao Liu , Daniel Thompson , Lee Jones , Sasha Levin Subject: [PATCH 4.4 034/112] backlight: sky81452-backlight: Fix refcount imbalance on error Date: Tue, 27 Oct 2020 14:49:04 +0100 Message-Id: <20201027134902.173666866@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134900.532249571@linuxfoundation.org> References: <20201027134900.532249571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: dinghao.liu@zju.edu.cn [ Upstream commit b7a4f80bc316a56d6ec8750e93e66f42431ed960 ] When of_property_read_u32_array() returns an error code, a pairing refcount decrement is needed to keep np's refcount balanced. Fixes: f705806c9f355 ("backlight: Add support Skyworks SKY81452 backlight driver") Signed-off-by: Dinghao Liu Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/video/backlight/sky81452-backlight.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/sky81452-backlight.c b/drivers/video/backlight/sky81452-backlight.c index d414c7a3acf5a..a2f77625b7170 100644 --- a/drivers/video/backlight/sky81452-backlight.c +++ b/drivers/video/backlight/sky81452-backlight.c @@ -207,6 +207,7 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt( num_entry); if (ret < 0) { dev_err(dev, "led-sources node is invalid.\n"); + of_node_put(np); return ERR_PTR(-EINVAL); } -- 2.25.1