lkml.org 
[lkml]   [2005]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.6.13] Unhandled error condition in aic79xx
On Thu, Sep 01, 2005 at 12:38:21PM -0700, Daniel Walker wrote:
> This patch should handle the case when scsi_add_host() fails.

> --- linux-2.6.13.orig/drivers/scsi/aic7xxx/aic79xx_osm.c
> +++ linux-2.6.13/drivers/scsi/aic7xxx/aic79xx_osm.c

> @@ -2065,7 +2066,11 @@ ahd_linux_register_host(struct ahd_softc
> ahd_unlock(ahd, &s);
>
> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
> - scsi_add_host(host, &ahd->dev_softc->dev); /* XXX handle failure */
> + error = scsi_add_host(host, &ahd->dev_softc->dev);
> + if (error) {
> + scsi_host_put(host);
> + return(error);
> + }
> scsi_scan_host(host);
> #endif
> return (0);

I see malloc(), kernel_thread() and multiple ahd_linux_alloc_target()
above. Ditto for 7xxx patch.

-
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-09-01 22:04    [W:0.037 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site