All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [PATCH] aic79xx_osm scsi_add_host error checking
Date: Mon, 30 May 2005 06:25:17 +0000	[thread overview]
Message-ID: <200505301025.17819.adobriyan@gmail.com> (raw)
In-Reply-To: <429A7511.9020007@gmail.com>

On Monday 30 May 2005 06:06, Chuck Short wrote:
> This patch checks for the return value of scsi_add_host.

> --- linux-source-2.6.12-2.6.11.93.orig/drivers/scsi/aic7xxx/aic79xx_osm.c
> +++ linux-source-2.6.12-2.6.11.93/drivers/scsi/aic7xxx/aic79xx_osm.c
> @@ -1989,7 +1989,8 @@
>  	char	*new_name;
>  	u_long	s;
>  	u_long	target;
> -
> +	int error;
> +	

Trailing whitespace.

>  	template->name = ahd->description;
>  	host = scsi_host_alloc(template, sizeof(struct ahd_softc *));
>  	if (host = NULL)
> @@ -2065,7 +2066,9 @@
>  	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)
> +		return (ENOMEM);	

Trailing whitespace.

>  	scsi_scan_host(host);
>  #endif
>  	return (0);

Also, before scsi_add_host() there is, at least:
	host = scsi_host_alloc(template, sizeof(struct ahd_softc *));
	new_name = malloc(strlen(buf) + 1, M_DEVBUF, M_NOWAIT);
	ahd->platform_data->dv_pid = kernel_thread(ahd_linux_dv_thread, ahd, 0);
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

      reply	other threads:[~2005-05-30  6:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-30  2:06 [KJ] [PATCH] aic79xx_osm scsi_add_host error checking Chuck Short
2005-05-30  6:25 ` Alexey Dobriyan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200505301025.17819.adobriyan@gmail.com \
    --to=adobriyan@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.