Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp364612pxa; Wed, 19 Aug 2020 03:37:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWDAEGaaY2XL3xJETsa9ffF4DDR9xGBYfJBfIuKjJs0rok1XSggJSdte8PCTYQLpSl7gcB X-Received: by 2002:a17:906:e87:: with SMTP id p7mr23802051ejf.547.1597833472098; Wed, 19 Aug 2020 03:37:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597833472; cv=none; d=google.com; s=arc-20160816; b=B9hNZrw+lh7JvBQsgMaPKuzxAwoxyehfcUHWLF2DWjZvtVJiBcknoT3zjV15RyYORa a48DNhGcLj9+dK9wvqbkLkba9iICHYthyLP5/ksFc6PdaRe9E7FSECLBzdgx8G8oaauM KPkIWh/Zok39+kfqqJlp6ARqanzS0icbohptfEws8JNnRbWztH065aGjXTy/cW7Kgjnv jhkN5dJs6WHNd0Bco8yBTRYHBWZ99kqbnPijuQzFCqt33ngF1fL6+BB3aA6DXq5mOszD +TdjCG6yCVqtI+Hoa3R+STUUrsJEmB6Ym54vVQNVdEmJDoI+Vek6k/kKB21c3LVuOewL qnHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=gqSQwu4Ak76ivz5DMvC1qM1RY6caUZn/vouX4UHQw3I=; b=waGTsIPNdDik1VwaFFBEiW5lXRTvOdhtMi9Ni6S0xefacxpskBk+XKxWwt+e5m4Aua 1ETGOuaTt9WJC8XuIFONeP1UcelD/qicCFHE7QMf08rjQJompAkit1B2zfO3XFteEJkD Tmi+nE4w/kckH140be5JJOBGsMm6QGBqhdMEDghGbCBvGtlzWppXtXF6bZkTZOvNwh4E F0UJrY1n/Xj4sPq5kbK3KQIOBZHSQV12Y3BvJ9yfnIxKQwHSCy1tN2S6vJuZYI1unEns nnzgLm3dIf9uMrpRrneUGAM6lxzIp/fow1GppsZ7q07DSJhQq9dm0yYT87Dz6wzSq/om j1Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CjTCQsyG; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bq8si5633962ejb.282.2020.08.19.03.37.28; Wed, 19 Aug 2020 03:37:52 -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=@linaro.org header.s=google header.b=CjTCQsyG; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727098AbgHSKgh (ORCPT + 99 others); Wed, 19 Aug 2020 06:36:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727019AbgHSKgf (ORCPT ); Wed, 19 Aug 2020 06:36:35 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDEDAC061342 for ; Wed, 19 Aug 2020 03:36:34 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id f7so21003011wrw.1 for ; Wed, 19 Aug 2020 03:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=gqSQwu4Ak76ivz5DMvC1qM1RY6caUZn/vouX4UHQw3I=; b=CjTCQsyG1PMArt9IepD1AZqckRAk1VWAupEx7JQzkjyj4JJtTiWuflR0Sq2kWOlrIf AaWwWJUo9s790go1/kOWmsg3VfSuAnCqhaYqnGEB6NvqzaiMeVKL89+mPVfkyKYPRlBv F3ln4glh1kKamDQItyNdbbUd7KHQSe8bFfn4AizOyXRJqpf+aUiB9OfBMIVowmmj2Dkh 32sW2AQHtksXyyfuS9GtW7tEBbufEqgBBuEtIhHGMLcPJifWSr5hNYlXBV2WgAPKdYLb OaXZiEsEgE4phiiHO9APtrdwmO5dgImWpr7tt84CkOXUGcvVgNU47iRONft3akrqJZK5 hGHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=gqSQwu4Ak76ivz5DMvC1qM1RY6caUZn/vouX4UHQw3I=; b=bIpeA71eF207O6BrZrx4c4XnSfqER5Cx1Dj5/1vHA433CAllT7jcmoWM28eEWxkyhw Lbs1t8SzEa3cViyfNv9cnr15UtYZWdHB685+cxMpwVWlFCr2CCiKAtJncUtoqtB9wEt5 0fbH3YmztWhY6TY4kuVCpvXiakymzWitXMqVgsiakmfgOFxsjylim4Zl5QphTVSGlcvZ 4p+yYV8PpWqphZm+8MG89oCRL81TMcoR1F+vdWXHkVGe0/YiID1hXYpzfWVDI/Latf7h Nt8VpQCHxxAuPx0BvCAt063ATQxLq5R4xrlj0N/HWtSPUN+ccM4duOcZu6LWp5g81j0Y sVMA== X-Gm-Message-State: AOAM530V2uNx8IQ0m7d3UdrYg959i1VAdDK3kWBJCW863NvRxfc+wQrw XpcgujxNL4bUgir8arigh7jmGA== X-Received: by 2002:a5d:60cb:: with SMTP id x11mr23007048wrt.281.1597833393382; Wed, 19 Aug 2020 03:36:33 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id b203sm5105222wmc.22.2020.08.19.03.36.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 03:36:32 -0700 (PDT) Date: Wed, 19 Aug 2020 11:36:31 +0100 From: Daniel Thompson To: Dinghao Liu Cc: kjlu@umn.edu, Lee Jones , Jingoo Han , Bartlomiej Zolnierkiewicz , Gyungoh Yoo , Bryan Wu , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] video: backlight: sky81452-backlight: Fix refcount imbalance on error Message-ID: <20200819103631.bptd34ij3fid4ych@holly.lan> References: <20200819030456.7054-1-dinghao.liu@zju.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200819030456.7054-1-dinghao.liu@zju.edu.cn> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 19, 2020 at 11:04:56AM +0800, Dinghao Liu wrote: > 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 > --- > 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 >