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, 30 Aug 2011 13:29:49 +0300
From:	Dan Carpenter <error27@...il.com>
To:	Greg KH <greg@...ah.com>
Cc:	"K. Y. Srinivasan" <kys@...rosoft.com>,
	devel@...uxdriverproject.org,
	Haiyang Zhang <haiyangz@...rosoft.com>, gregkh@...e.de,
	linux-kernel@...r.kernel.org, virtualization@...ts.osdl.org
Subject: Re: [PATCH 41/46] Staging: hv: vmbus: Fix a bug in error handling in
 vmbus_bus_init()

> err3:
> 	free_irq(irq, hv_acpi_dev);
> err2:
> 	bus_unregister(&hv_bus);
> err1:
> 	hv_cleanup();

Also here is an oldbie trick.  You could use multiples of ten like
err30, err20, and err10.  That way if you can add more error handling
in the middle without changing the numbering.  I knew my GW-BASIC
experience would come in handy one day.  :)

The better way to label things is based on what happens when you get
there: err_irq, err_unregister, err_cleanup.

Some people label things based on where the goto is, but that breaks
down if there is more than one goto.  It doesn't really make sense to
name the destination after the starting point.

regards,
dan carpenter
--
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