Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp169684pxa; Tue, 18 Aug 2020 20:07:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEy9f4nAFqlVSe6TvibXVONL/ih5/novjhlTsHS4DkE0akEB19+tb+X0TneSEavmptuoM9 X-Received: by 2002:a17:906:6413:: with SMTP id d19mr22512168ejm.206.1597806439724; Tue, 18 Aug 2020 20:07:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597806439; cv=none; d=google.com; s=arc-20160816; b=yiZrE8gjstrkJQf2YzCdSu9AtGynd2fAGt3C2Y6tDB9T4WX1B80SWdv8Dvoz65IwuT A3v+smX35HZ/AuT8Q28QcoUnhNFP07rXnq6VsMDdxIoweVSegmD8TPgAU7oX17A5ZKzz VyerZPsWYBc7cKx0ZjFL4y8M+iQF2beMcqkycVT/UgfL14JOdKbWcmDf9RxTpAfs0Z7/ gDaa/51T4MWsz93ydCntAlpecH/QVGOAonAdQDTv/X62n+rVtxXJL4c/lamMjF5pGFWc 4u/lV8rl6ABv3nN7sknv52nD8WWO+wLWTzq+yepbNhTJzpNdEq01CsySlf60fuNzH87n DXDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=uy01fSJVzziIIF07KHSezJphERSXXefaA7gklNFyPPw=; b=GLy7uiVLFKnrjbBqis9JgouzVuoRK8wG9t16gy+O5wGs/sp+2kQk39jBr9G3KmU++s mR2tznrZGqtqDOA6weeIkO3wt7n0m7BGExZ5cjDqCa6bglTdL2YDG+UX3YE/n8NPqs/w 46zn7WgPEv3vTKGULaE7g65NkmCMHJnQ7W/grZu/GRaS8QnQqFBoyceD/1WjHPjV5EPe 3jgv4ByiuPFBePHDXAKwWg2s5sIdk6PR1tJMDv58kRO5+9g826EtQj8BdlREkydtnIb2 Awjltd1BW4x20HG5RuSCmmf2ILrTHIoSakdvXuRMu6edjOkyWMqzT2/4BifGXbq6+M3m uJpQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j11si4721634edr.112.2020.08.18.20.06.56; Tue, 18 Aug 2020 20:07:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727831AbgHSDFW (ORCPT + 99 others); Tue, 18 Aug 2020 23:05:22 -0400 Received: from spam.zju.edu.cn ([61.164.42.155]:52404 "EHLO zju.edu.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726605AbgHSDFW (ORCPT ); Tue, 18 Aug 2020 23:05:22 -0400 Received: from localhost.localdomain (unknown [210.32.144.184]) by mail-app2 (Coremail) with SMTP id by_KCgDX3+faljxfrTj_AQ--.23396S4; Wed, 19 Aug 2020 11:05:03 +0800 (CST) From: Dinghao Liu To: dinghao.liu@zju.edu.cn, kjlu@umn.edu Cc: Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , Gyungoh Yoo , Bryan Wu , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: backlight: sky81452-backlight: Fix refcount imbalance on error Date: Wed, 19 Aug 2020 11:04:56 +0800 Message-Id: <20200819030456.7054-1-dinghao.liu@zju.edu.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: by_KCgDX3+faljxfrTj_AQ--.23396S4 X-Coremail-Antispam: 1UD129KBjvdX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zjiaqtzq6lmxovvfxof0/1tbiAgcLBlZdtPihowAasX Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 0ce181585008..8268ac43d54f 100644 --- a/drivers/video/backlight/sky81452-backlight.c +++ b/drivers/video/backlight/sky81452-backlight.c @@ -217,6 +217,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.17.1