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:	Mon, 13 Sep 2010 09:12:53 -0400
From:	Chris Metcalf <cmetcalf@...era.com>
To:	Vasiliy Kulikov <segooon@...il.com>
CC:	<kernel-janitors@...r.kernel.org>, Arnd Bergmann <arnd@...db.de>,
	Paul Mundt <lethal@...ux-sh.org>,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	<linuxppc-dev@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] char: hvc: check for error case

 On 9/12/2010 2:57 PM, Vasiliy Kulikov wrote:
> hvc_alloc() may fail, if so exit from init() with error.
>
> Signed-off-by: Vasiliy Kulikov <segooon@...il.com>

Thanks, accepted into my tree (for the next merge window).  In practice all
this means is in debug mode we'll get a warning from do_one_initcall()
rather than silence, but you're right, it's technically better. :-)

> ---
>  I cannot compile this driver at all, so it is not tested.
>
>  drivers/char/hvc_tile.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/char/hvc_tile.c b/drivers/char/hvc_tile.c
> index c4efb55..7a84a05 100644
> --- a/drivers/char/hvc_tile.c
> +++ b/drivers/char/hvc_tile.c
> @@ -61,7 +61,8 @@ console_initcall(hvc_tile_console_init);
>  
>  static int __init hvc_tile_init(void)
>  {
> -	hvc_alloc(0, 0, &hvc_tile_get_put_ops, 128);
> -	return 0;
> +	struct hvc_struct *s;
> +	s = hvc_alloc(0, 0, &hvc_tile_get_put_ops, 128);
> +	return IS_ERR(s) ? PTR_ERR(s) : 0;
>  }
>  device_initcall(hvc_tile_init);

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com

--
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