lkml.org 
[lkml]   [2005]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fix warning and missing failure handling for scsi_add_host in aic7xxx driver
On 12/14/05, James Bottomley <James.Bottomley@steeleye.com> wrote:
> On Wed, 2005-12-14 at 00:07 +0100, Jesper Juhl wrote:
> > + if (retval) {
> > + printk(KERN_ERR "aic7xxx: scsi_add_host failed\n");
> > + goto free_and_out;
> > + }
> > +
> > scsi_scan_host(host);
> > - return (0);
> > +
> > +out:
> > + return retval;
> > +free_and_out:
> > + scsi_remove_host(host);
> > + goto out;
>
> I'm not incredibly keen on all this jumping around for no reason. If
> there's a normal out and an error out, then fine, but in this case the
> if (retval) { } could contain the entirety of the error path with an
> else for the normal path.
>
Ok, I'll change that.

> scsi_remove_host() is the wrong API, it should be scsi_host_put() (for
> an allocated but un added host).
>
Ohh, I misunderstood things then, I'll correct that.

I'll send a new patch later today when I get home from work.

Thank you for taking a look at the patch and your feedback.

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-14 09:04    [W:0.091 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site