From: Daniel Thompson <daniel.thompson@linaro.org> To: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Lee Jones <lee.jones@linaro.org>, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jingoo Han <jingoohan1@gmail.com>, Brian Masney <masneyb@onstation.org>, Dan Murphy <dmurphy@ti.com> Subject: Re: [PATCH v1 1/1] backlight: lm3630a_bl: Put fwnode in error case during ->probe() Date: Thu, 13 May 2021 11:37:45 +0100 [thread overview] Message-ID: <20210513103745.2dzawk7c63ku2vz6@maple.lan> (raw) In-Reply-To: <20210510095716.3302910-1-andy.shevchenko@gmail.com> On Mon, May 10, 2021 at 12:57:16PM +0300, Andy Shevchenko wrote: > device_for_each_child_node() bumps a reference counting of a returned variable. > We have to balance it whenever we return to the caller. > > Fixes: 8fbce8efe15cd ("backlight: lm3630a: Add firmware node support") > Cc: Brian Masney <masneyb@onstation.org> > Cc: Dan Murphy <dmurphy@ti.com> > Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> > --- > drivers/video/backlight/lm3630a_bl.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c > index e88a2b0e5904..662029d6a3dc 100644 > --- a/drivers/video/backlight/lm3630a_bl.c > +++ b/drivers/video/backlight/lm3630a_bl.c > @@ -482,8 +482,10 @@ static int lm3630a_parse_node(struct lm3630a_chip *pchip, > > device_for_each_child_node(pchip->dev, node) { > ret = lm3630a_parse_bank(pdata, node, &seen_led_sources); > - if (ret) > + if (ret) { > + fwnode_handle_put(node); > return ret; > + } > } > > return ret; > -- > 2.31.1 >
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Thompson <daniel.thompson@linaro.org> To: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: linux-fbdev@vger.kernel.org, Jingoo Han <jingoohan1@gmail.com>, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Dan Murphy <dmurphy@ti.com>, Lee Jones <lee.jones@linaro.org>, Brian Masney <masneyb@onstation.org> Subject: Re: [PATCH v1 1/1] backlight: lm3630a_bl: Put fwnode in error case during ->probe() Date: Thu, 13 May 2021 11:37:45 +0100 [thread overview] Message-ID: <20210513103745.2dzawk7c63ku2vz6@maple.lan> (raw) In-Reply-To: <20210510095716.3302910-1-andy.shevchenko@gmail.com> On Mon, May 10, 2021 at 12:57:16PM +0300, Andy Shevchenko wrote: > device_for_each_child_node() bumps a reference counting of a returned variable. > We have to balance it whenever we return to the caller. > > Fixes: 8fbce8efe15cd ("backlight: lm3630a: Add firmware node support") > Cc: Brian Masney <masneyb@onstation.org> > Cc: Dan Murphy <dmurphy@ti.com> > Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> > --- > drivers/video/backlight/lm3630a_bl.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c > index e88a2b0e5904..662029d6a3dc 100644 > --- a/drivers/video/backlight/lm3630a_bl.c > +++ b/drivers/video/backlight/lm3630a_bl.c > @@ -482,8 +482,10 @@ static int lm3630a_parse_node(struct lm3630a_chip *pchip, > > device_for_each_child_node(pchip->dev, node) { > ret = lm3630a_parse_bank(pdata, node, &seen_led_sources); > - if (ret) > + if (ret) { > + fwnode_handle_put(node); > return ret; > + } > } > > return ret; > -- > 2.31.1 >
next prev parent reply other threads:[~2021-05-13 10:38 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-10 9:57 [PATCH v1 1/1] backlight: lm3630a_bl: Put fwnode in error case during ->probe() Andy Shevchenko 2021-05-10 9:57 ` Andy Shevchenko 2021-05-10 10:41 ` Brian Masney 2021-05-10 10:41 ` Brian Masney 2021-05-13 10:37 ` Daniel Thompson [this message] 2021-05-13 10:37 ` Daniel Thompson 2021-05-19 14:33 ` Lee Jones 2021-05-19 14:33 ` Lee Jones
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210513103745.2dzawk7c63ku2vz6@maple.lan \ --to=daniel.thompson@linaro.org \ --cc=andy.shevchenko@gmail.com \ --cc=dmurphy@ti.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=jingoohan1@gmail.com \ --cc=lee.jones@linaro.org \ --cc=linux-fbdev@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=masneyb@onstation.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.