* [PATCH -mm] bttv: must_check fixes
@ 2006-07-12 3:44 Randy.Dunlap
2006-07-12 5:01 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Randy.Dunlap @ 2006-07-12 3:44 UTC (permalink / raw)
To: lkml; +Cc: mchehab, akpm
From: Randy Dunlap <rdunlap@xenotime.net>
Check all __must_check warnings in bttv.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/media/video/bt8xx/bttv-driver.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
--- linux-2618-rc1mm1.orig/drivers/media/video/bt8xx/bttv-driver.c
+++ linux-2618-rc1mm1/drivers/media/video/bt8xx/bttv-driver.c
@@ -3909,6 +3909,8 @@ static void bttv_unregister_video(struct
/* register video4linux devices */
static int __devinit bttv_register_video(struct bttv *btv)
{
+ int ret;
+
if (no_overlay <= 0) {
bttv_video_template.type |= VID_TYPE_OVERLAY;
} else {
@@ -3923,7 +3925,10 @@ static int __devinit bttv_register_video
goto err;
printk(KERN_INFO "bttv%d: registered device video%d\n",
btv->c.nr,btv->video_dev->minor & 0x1f);
- video_device_create_file(btv->video_dev, &class_device_attr_card);
+ ret = video_device_create_file(btv->video_dev, &class_device_attr_card);
+ if (ret < 0)
+ printk(KERN_WARNING "bttv: video_device_create_file error: "
+ "%d\n", ret);
/* vbi */
btv->vbi_dev = vdev_init(btv, &bttv_vbi_template, "vbi");
@@ -4287,6 +4292,8 @@ static struct pci_driver bttv_pci_driver
static int bttv_init_module(void)
{
+ int ret;
+
bttv_num = 0;
printk(KERN_INFO "bttv: driver version %d.%d.%d loaded\n",
@@ -4308,7 +4315,12 @@ static int bttv_init_module(void)
bttv_check_chipset();
- bus_register(&bttv_sub_bus_type);
+ ret = bus_register(&bttv_sub_bus_type);
+ if (ret < 0) {
+ printk(KERN_WARNING "bttv: bus_register error: %d\n", ret);
+ return ret;
+ }
+
return pci_register_driver(&bttv_pci_driver);
}
---
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -mm] bttv: must_check fixes
2006-07-12 3:44 [PATCH -mm] bttv: must_check fixes Randy.Dunlap
@ 2006-07-12 5:01 ` Andrew Morton
2006-07-12 5:09 ` Randy.Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2006-07-12 5:01 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: linux-kernel, mchehab
On Tue, 11 Jul 2006 20:44:21 -0700
"Randy.Dunlap" <rdunlap@xenotime.net> wrote:
> Check all __must_check warnings in bttv.
Thanks.
The descriptions do rather miss the point: the objective is not to squish the
__must_check warnings - it is to detect and handler error conditions.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -mm] bttv: must_check fixes
2006-07-12 5:01 ` Andrew Morton
@ 2006-07-12 5:09 ` Randy.Dunlap
0 siblings, 0 replies; 3+ messages in thread
From: Randy.Dunlap @ 2006-07-12 5:09 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, mchehab
On Tue, 11 Jul 2006 22:01:48 -0700 Andrew Morton wrote:
> On Tue, 11 Jul 2006 20:44:21 -0700
> "Randy.Dunlap" <rdunlap@xenotime.net> wrote:
>
> > Check all __must_check warnings in bttv.
>
> Thanks.
>
> The descriptions do rather miss the point: the objective is not to squish the
> __must_check warnings - it is to detect and handler error conditions.
Ack. Will fix my fingers.
---
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-07-12 5:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-12 3:44 [PATCH -mm] bttv: must_check fixes Randy.Dunlap
2006-07-12 5:01 ` Andrew Morton
2006-07-12 5:09 ` Randy.Dunlap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.