From: Antti Palosaari <crope@iki.fi>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
Hans Verkuil <hans.verkuil@cisco.com>,
Sachin Kamat <sachin.kamat@linaro.org>,
Michael Opdenacker <michael.opdenacker@free-electrons.com>
Subject: Re: [PATCH 09/18] [media] cx88: remove return after BUG()
Date: Thu, 25 Sep 2014 01:32:04 +0300 [thread overview]
Message-ID: <54234664.3030500@iki.fi> (raw)
In-Reply-To: <9558d5ca24c16761b267ac700661aeaa501f1b1e.1411597610.git.mchehab@osg.samsung.com>
Are these even cases you should use BUG()? How about WARN()...
Antti
On 09/25/2014 01:27 AM, Mauro Carvalho Chehab wrote:
> As reported by smatch:
>
> drivers/media/pci/cx88/cx88-video.c:699 get_queue() info: ignoring unreachable code.
> drivers/media/pci/cx88/cx88-video.c:714 get_resource() info: ignoring unreachable code.
> drivers/media/pci/cx88/cx88-video.c:815 video_read() info: ignoring unreachable code.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
>
> diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c
> index ed8cb9037b6f..ce27e6d4f16e 100644
> --- a/drivers/media/pci/cx88/cx88-video.c
> +++ b/drivers/media/pci/cx88/cx88-video.c
> @@ -696,7 +696,6 @@ static struct videobuf_queue *get_queue(struct file *file)
> return &fh->vbiq;
> default:
> BUG();
> - return NULL;
> }
> }
>
> @@ -711,7 +710,6 @@ static int get_resource(struct file *file)
> return RESOURCE_VBI;
> default:
> BUG();
> - return 0;
> }
> }
>
> @@ -812,7 +810,6 @@ video_read(struct file *file, char __user *data, size_t count, loff_t *ppos)
> file->f_flags & O_NONBLOCK);
> default:
> BUG();
> - return 0;
> }
> }
>
>
--
http://palosaari.fi/
next prev parent reply other threads:[~2014-09-24 22:32 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 22:27 [PATCH 01/18] [media] ir-hix5hd2: fix address space casting Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 02/18] [media] st_rc: " Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 03/18] [media] sta2x11_vip: " Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 04/18] [media] saa7164-core: declare symbols as static Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 05/18] [media] pms: Fix a bad usage of the stack Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 06/18] [media] radio-sf16fmi: declare pnp_attached as static Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 07/18] [media] radio-sf16fmr2: declare some structs " Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 08/18] [media] cx88: fix cards table CodingStyle Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 09/18] [media] cx88: remove return after BUG() Mauro Carvalho Chehab
2014-09-24 22:32 ` Antti Palosaari [this message]
2014-09-24 23:14 ` Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 10/18] [media] saa7146: " Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 11/18] [media] drxd: remove a dead code Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 12/18] [media] em28xx: Fix identation Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 13/18] [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64 Mauro Carvalho Chehab
2014-09-24 23:05 ` Fabio Estevam
2014-09-24 22:27 ` [PATCH 14/18] [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 15/18] [media] s5p_mfc_opr: Fix warnings Mauro Carvalho Chehab
2014-09-24 23:02 ` Fabio Estevam
2014-09-24 23:25 ` Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 16/18] s5p-mfc: Fix several printk warnings Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 17/18] [media] s3c-camif: fix dma_addr_t printks Mauro Carvalho Chehab
2014-09-25 10:40 ` Sylwester Nawrocki
2014-09-24 22:27 ` [PATCH 18/18] [media] ti-vpe: Fix typecast Mauro Carvalho Chehab
2014-09-24 23:42 ` [PATCH 01/18] [media] ir-hix5hd2: fix address space casting zhangfei
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=54234664.3030500@iki.fi \
--to=crope@iki.fi \
--cc=hans.verkuil@cisco.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mchehab@osg.samsung.com \
--cc=michael.opdenacker@free-electrons.com \
--cc=sachin.kamat@linaro.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;
as well as URLs for NNTP newsgroup(s).