From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage
Date: Mon, 31 Oct 2022 18:28:26 +0000 [thread overview]
Message-ID: <7ba5c01f-7b46-e031-0a82-290de08d1175@linaro.org> (raw)
In-Reply-To: <20220923155740.422411-1-krzysztof.kozlowski@linaro.org>
On 23/09/2022 16:57, Krzysztof Kozlowski wrote:
> slim_disable_stream() and slim_stream_unprepare() are exported, so add
> sanity checks preventing unmatched/invalid calls.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Applied all.
thanks,
--srini
> drivers/slimbus/stream.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/slimbus/stream.c b/drivers/slimbus/stream.c
> index 75f87b3d8b95..7bb073ca6006 100644
> --- a/drivers/slimbus/stream.c
> +++ b/drivers/slimbus/stream.c
> @@ -407,6 +407,9 @@ int slim_stream_disable(struct slim_stream_runtime *stream)
> struct slim_controller *ctrl = stream->dev->ctrl;
> int ret, i;
>
> + if (!stream->ports || !stream->num_ports)
> + return -EINVAL;
> +
> if (ctrl->disable_stream)
> ctrl->disable_stream(stream);
>
> @@ -438,6 +441,9 @@ int slim_stream_unprepare(struct slim_stream_runtime *stream)
> {
> int i;
>
> + if (!stream->ports || !stream->num_ports)
> + return -EINVAL;
> +
> for (i = 0; i < stream->num_ports; i++)
> slim_disconnect_port(stream, &stream->ports[i]);
>
prev parent reply other threads:[~2022-10-31 18:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-23 15:57 Krzysztof Kozlowski
2022-09-23 15:57 ` [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom,apq8064-slim compatible Krzysztof Kozlowski
2022-09-26 8:03 ` Neil Armstrong
2022-09-23 15:57 ` [PATCH 3/5] slimbus: qcom-ctrl: use devm_platform_ioremap_resource_byname() Krzysztof Kozlowski
2022-09-26 8:03 ` Neil Armstrong
2022-09-23 15:57 ` [PATCH 4/5] slimbus: qcom-ngd-ctrl: use devm_platform_get_and_ioremap_resource() Krzysztof Kozlowski
2022-09-26 8:03 ` Neil Armstrong
2022-09-23 15:57 ` [PATCH 5/5] slimbus: qcom-ngd-ctrl: reinit the reconf completion flag Krzysztof Kozlowski
2022-10-26 16:30 ` [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage Krzysztof Kozlowski
2022-10-26 16:31 ` Krzysztof Kozlowski
2022-10-31 18:28 ` Srinivas Kandagatla [this message]
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=7ba5c01f-7b46-e031-0a82-290de08d1175@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=agross@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=andersson@kernel.org \
--cc=konrad.dybcio@somainline.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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: 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
all inboxes | Powered by JetHome®