lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 11 Mar 2008 23:25:02 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Roland McGrath <roland@...hat.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] genhd must_check warning fix

Roland McGrath wrote:
> Fixes:
> 
> 	block/genhd.c:361: warning: ignoring return value of ‘class_register’, declared with attribute warn_unused_result
> 
> Signed-off-by: Roland McGrath <roland@...hat.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();

ACK

I was silly and simply tuned out this warning, assuming [wrongly] that 
it was difficult to fix like the fs/partitions.c warning.

Shows how "helpful" those warnings are...

	Jeff



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ