From: Akinobu Mita Date: Mon, 21 Apr 2008 07:51:06 +0000 (+0200) Subject: block: fix blk_register_queue() return value X-Git-Tag: v2.6.26-rc1~1115^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb199746303a6bfd6121834ec9e810471185c530;p=pandora-kernel.git block: fix blk_register_queue() return value blk_register_queue() returns -ENXIO when queue->request_fn is NULL. But there are some block drivers that call blk_register_queue() via add_disk() with queue->request_fn == NULL. (For example, brd, loop) Although no one checks return value of blk_register_queue(), this patch makes it return 0 instead of -ENXIO when queue->request_fn is NULL, Also this patch adds warning when blk_register_queue() and blk_unregister_queue() are called with queue == NULL rather than ignore invalid usage silently. Signed-off-by: Akinobu Mita Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe --- Reading git-diff-tree failed