From: Markus Elfring <Markus.Elfring@web.de>
To: Bard Liao <yung-chuan.liao@linux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
linux-sound@vger.kernel.org, kernel-janitors@vger.kernel.org,
Vinod Koul <vkoul@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Bard Liao <bard.liao@intel.com>,
Vinod Koul <vinod.koul@linaro.org>
Subject: Re: [PATCH] soundwire: fix usages of device_get_named_child_node()
Date: Mon, 29 Apr 2024 13:31:13 +0200 [thread overview]
Message-ID: <eb15ab0a-e416-4ae9-98bb-610fdc04492c@web.de> (raw)
In-Reply-To: <20240429004935.2400191-1-yung-chuan.liao@linux.intel.com>
…
> Add fwnode_handle_put() to avoid leaked references.
calls?
Would you like to add the tag “Fixes” accordingly?
…
> +++ b/drivers/soundwire/mipi_disco.c
…
> @@ -236,8 +244,10 @@ static int sdw_slave_read_dpn(struct sdw_slave *slave,
> dpn[i].num_channels,
> sizeof(*dpn[i].channels),
> GFP_KERNEL);
> - if (!dpn[i].channels)
> + if (!dpn[i].channels) {
> + fwnode_handle_put(node);
> return -ENOMEM;
> + }
>
> fwnode_property_read_u32_array(node,
> "mipi-sdw-channel-number-list",
> @@ -251,8 +261,10 @@ static int sdw_slave_read_dpn(struct sdw_slave *slave,
> dpn[i].num_ch_combinations,
> sizeof(*dpn[i].ch_combinations),
> GFP_KERNEL);
> - if (!dpn[i].ch_combinations)
> + if (!dpn[i].ch_combinations) {
> + fwnode_handle_put(node);
> return -ENOMEM;
> + }
>
> fwnode_property_read_u32_array(node,
> "mipi-sdw-channel-combination-list",
…
* Would you like to complete the exception handling by using goto chains?
* How do you think about to increase the application of scope-based resource management?
Regards,
Markus
next prev parent reply other threads:[~2024-04-29 11:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-29 0:49 [PATCH] soundwire: fix usages of device_get_named_child_node() Bard Liao
2024-04-29 11:31 ` Markus Elfring [this message]
2024-05-04 12:56 ` Vinod Koul
2024-05-06 0:48 ` Liao, Bard
2024-06-03 6:11 ` Vinod Koul
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=eb15ab0a-e416-4ae9-98bb-610fdc04492c@web.de \
--to=markus.elfring@web.de \
--cc=bard.liao@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=vinod.koul@linaro.org \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox