lkml.org 
[lkml]   [2011]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 41/46] Staging: hv: vmbus: Fix a bug in error handling in vmbus_bus_init()
Date


> -----Original Message-----
> From: Greg KH [mailto:greg@kroah.com]
> Sent: Tuesday, August 30, 2011 10:07 AM
> To: Dan Carpenter
> Cc: KY Srinivasan; devel@linuxdriverproject.org; Haiyang Zhang; gregkh@suse.de;
> linux-kernel@vger.kernel.org; virtualization@lists.osdl.org
> Subject: Re: [PATCH 41/46] Staging: hv: vmbus: Fix a bug in error handling in
> vmbus_bus_init()
>
> On Tue, Aug 30, 2011 at 01:29:49PM +0300, Dan Carpenter wrote:
> > > 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.
>
> Yes, that's the best way to do this, thanks for pointing it out.

I will fix this up.

Regards,

K. Y
>
> greg k-h



\
 
 \ /
  Last update: 2011-08-30 19:27    [W:0.093 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site