From: Dan Carpenter <dan.carpenter@oracle.com>
To: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alex Elder <elder@kernel.org>, Johan Hovold <johan@kernel.org>,
Mark Greer <mgreer@animalcreek.com>,
devel@driverdev.osuosl.org, greybus-dev@lists.linaro.org,
Colin Ian King <colin.king@canonical.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] staging: greybus: audio: fix uninitialized value issue
Date: Mon, 10 Aug 2020 18:03:56 +0300 [thread overview]
Message-ID: <20200810150356.GL1793@kadam> (raw)
In-Reply-To: <a5d4bb540e606d7980d4127a82e6af9b436e0642.1596730667.git.vaibhav.sr@gmail.com>
On Thu, Aug 06, 2020 at 09:51:57PM +0530, Vaibhav Agarwal wrote:
> diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c
> index 2f9fdbdcd547..4b914d0edef2 100644
> --- a/drivers/staging/greybus/audio_topology.c
> +++ b/drivers/staging/greybus/audio_topology.c
> @@ -456,6 +456,13 @@ static int gbcodec_mixer_dapm_ctl_put(struct snd_kcontrol *kcontrol,
> val = ucontrol->value.integer.value[0] & mask;
> connect = !!val;
>
> + ret = gb_pm_runtime_get_sync(bundle);
> + if (ret)
> + return ret;
> +
> + ret = gb_audio_gb_get_control(module->mgmt_connection, data->ctl_id,
> + GB_AUDIO_INVALID_INDEX, &gbvalue);
We need to check "ret" after this.
> +
> /* update ucontrol */
> if (gbvalue.value.integer_value[0] != val) {
> for (wi = 0; wi < wlist->num_widgets; wi++) {
> @@ -466,16 +473,10 @@ static int gbcodec_mixer_dapm_ctl_put(struct snd_kcontrol *kcontrol,
regards,
dan carpenter
next prev parent reply other threads:[~2020-08-10 15:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-06 16:21 [PATCH v1] staging: greybus: audio: fix uninitialized value issue Vaibhav Agarwal
2020-08-10 15:03 ` Dan Carpenter [this message]
2020-08-11 16:45 ` Vaibhav Agarwal
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=20200810150356.GL1793@kadam \
--to=dan.carpenter@oracle.com \
--cc=colin.king@canonical.com \
--cc=devel@driverdev.osuosl.org \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mgreer@animalcreek.com \
--cc=vaibhav.sr@gmail.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