All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] genhd must_check warning fix
@ 2008-03-12  0:13 Roland McGrath
  2008-03-12  3:25 ` Jeff Garzik
  0 siblings, 1 reply; 6+ messages in thread
From: Roland McGrath @ 2008-03-12  0:13 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds; +Cc: linux-kernel

Fixes:

	block/genhd.c:361: warning: ignoring return value of ‘class_register’, declared with attribute warn_unused_result

Signed-off-by: Roland McGrath <roland@redhat.com>
---
 block/genhd.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/block/genhd.c b/block/genhd.c
index c44527d..00da521 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -360,7 +360,9 @@ static struct kobject *base_probe(dev_t devt, int *part, void *data)
 
 static int __init genhd_device_init(void)
 {
-	class_register(&block_class);
+	int error = class_register(&block_class);
+	if (unlikely(error))
+		return error;
 	bdev_map = kobj_map_init(base_probe, &block_class_lock);
 	blk_dev_init();
 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-03-12 15:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-12  0:13 [PATCH] genhd must_check warning fix Roland McGrath
2008-03-12  3:25 ` Jeff Garzik
2008-03-12  3:40   ` Nick Piggin
2008-03-12  3:53     ` Jeff Garzik
2008-03-12  4:07       ` Nick Piggin
2008-03-12 15:05         ` Linus Torvalds

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.