From: Dan Carpenter <dan.carpenter@oracle.com>
To: zhengbin <zhengbin13@huawei.com>
Cc: devel@driverdev.osuosl.org, eric@anholt.net,
gregkh@linuxfoundation.org, abbotti@mev.co.uk, wahrenst@gmx.net
Subject: Re: [PATCH 1/6] staging: bcm2835-audio: Remove set but not used variable 'status'
Date: Tue, 8 Oct 2019 09:04:49 +0300 [thread overview]
Message-ID: <20191008060449.GA12948@kadam> (raw)
In-Reply-To: <1570513142-60177-2-git-send-email-zhengbin13@huawei.com>
On Tue, Oct 08, 2019 at 01:38:57PM +0800, zhengbin wrote:
> diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> index c6f9cf1..8a94c5b 100644
> --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> @@ -96,13 +96,12 @@ static void audio_vchi_callback(void *param,
> struct bcm2835_audio_instance *instance = param;
> struct vc_audio_msg m;
> int msg_len;
> - int status;
>
> if (reason != VCHI_CALLBACK_MSG_AVAILABLE)
> return;
>
> - status = vchi_msg_dequeue(instance->vchi_handle,
> - &m, sizeof(m), &msg_len, VCHI_FLAGS_NONE);
> + vchi_msg_dequeue(instance->vchi_handle,
> + &m, sizeof(m), &msg_len, VCHI_FLAGS_NONE);
This looks like a bug in the code. flags is VCHI_FLAGS_NONE so it can
return -1 and we should check for that.
> if (m.type == VC_AUDIO_MSG_TYPE_RESULT) {
regards,
dan carpenter
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2019-10-08 6:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-08 5:38 [PATCH 0/6] staging: Remove a bounch set of set but not used variables zhengbin
2019-10-08 5:38 ` [PATCH 1/6] staging: bcm2835-audio: Remove set but not used variable 'status' zhengbin
2019-10-08 6:04 ` Dan Carpenter [this message]
2019-10-08 5:38 ` [PATCH 2/6] staging: sm750fb: Remove set but not used variable 'uiActualPixelClk' zhengbin
2019-10-08 6:06 ` Dan Carpenter
2019-10-08 6:08 ` Dan Carpenter
2019-10-08 5:38 ` [PATCH 3/6] staging: sm750fb: Remove set but not used variable 'actual_mx_clk' zhengbin
2019-10-08 5:39 ` [PATCH 4/6] staging: comedi: Remove set but not used variable 'data' zhengbin
2019-10-08 5:39 ` [PATCH 5/6] staging: comedi: Remove set but not used variable 'hi' zhengbin
2019-10-08 5:39 ` [PATCH 6/6] staging: comedi: Remove set but not used variable 'aref' zhengbin
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=20191008060449.GA12948@kadam \
--to=dan.carpenter@oracle.com \
--cc=abbotti@mev.co.uk \
--cc=devel@driverdev.osuosl.org \
--cc=eric@anholt.net \
--cc=gregkh@linuxfoundation.org \
--cc=wahrenst@gmx.net \
--cc=zhengbin13@huawei.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;
as well as URLs for NNTP newsgroup(s).