Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp527376pxx; Wed, 28 Oct 2020 10:19:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweswkesW1n6SpwTeSJEBl0etJcNM5VR4cntV4RhTFAI/Jd0OyO4Av+cbxaN99lekcdCt9h X-Received: by 2002:a17:906:5651:: with SMTP id v17mr138058ejr.2.1603905587021; Wed, 28 Oct 2020 10:19:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603905587; cv=none; d=google.com; s=arc-20160816; b=ir29Ar1zDMsHF9x4e3zoGUMc9i98y0KpJjc5ynKoWi9JIswy34A3ghgTusJu9cRNl0 muQoMzy29XOPX2uVR6lWVdyklsKbAGKB7qp8okXGkKkdtgTYLTRRk3A+rf0S52bndw5+ fccnwQRA/W+iy7KUliFHMLByYUdSj/qO0F1IpO1ig8f+az4sHlgoy8oeJyN5Yhqmly49 MdZgZnXGrMUhn0Msrgfkqc4q7LaGv8RHr/1w1ImfTIzoYfTpKAgpk6BSSFWwh6HbMtNR +EGus+pikmeOvMndja55pgFbYRWfts05FLwRYJhKO8bdMUTt05ZRoEdq1jTS/dB1hsBx ZFFg== 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=WJ8q3nlp+byANUmuunRdZjIWM9OWSgFJIrIzHfggvuI=; b=dE78BF0jk5G5pvRlEtcRykGYhP6pwSji3Nd538hr+yMvKEZfqQMv8jtJw6UCDdgv+B EEr8Dkoms7Ja9CLwktsc6osNn9lV3nnMKlQMi0m3AJM18bSUf3T+E7Sx0ncdCX6zRPGR 9ALYMgHjAa7rirr3AUYS9ybB2jIb5ak8Y5vgOYrpbopnT/4HaE7+92dt6YQXCSvXOpx3 jtzwvvgUNaKnrvkmiiU1stNBoHfhw+Jepc0I7michsuG+QYWhinpMa0kkZduXv9V3MXA U9qcIpg7D2nJ0+LhSj0lwocnhXvdUUOwVhJxCi1A3rm13lS26jPTr7PkR7waCVm0+oJ8 bO+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="bO5o2/1s"; 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 g16si3749206ejk.300.2020.10.28.10.19.24; Wed, 28 Oct 2020 10:19:47 -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="bO5o2/1s"; 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 S1820757AbgJ0Rh6 (ORCPT + 99 others); Tue, 27 Oct 2020 13:37:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:33962 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760574AbgJ0OfP (ORCPT ); Tue, 27 Oct 2020 10:35:15 -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 B2FC7207BB; Tue, 27 Oct 2020 14:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809315; bh=jk++oXg9ZuIaZJ4ij8Qs7cweRKYW8CKYUpAEO/LCNbc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bO5o2/1smxRXxdhr4hiNj70IXIcw/EK1vZJ7AbVLBA96JM1l9nEG/ZybO9vzdL4t+ SaS9oN66DNhEsKvWViXcdsobk6Lv1phpO8m+HIuVpy0vGAx7oyMtvf3NL0SG32oIte fzasQVvwibbdbzh5TBtnvZ6dTLlssQKSngxE7e+0= 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 5.4 122/408] backlight: sky81452-backlight: Fix refcount imbalance on error Date: Tue, 27 Oct 2020 14:51:00 +0100 Message-Id: <20201027135500.768910201@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@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 2355f00f57732..1f6301375fd33 100644 --- a/drivers/video/backlight/sky81452-backlight.c +++ b/drivers/video/backlight/sky81452-backlight.c @@ -196,6 +196,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