[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150714090844.GE4341@mwanda>
Date: Tue, 14 Jul 2015 12:08:44 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: hare@...e.de, JBottomley@...n.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] aic7xxx: replace kmalloc/strcpy by kstrdup
On Tue, Jul 14, 2015 at 09:25:16AM +0200, Christophe JAILLET wrote:
> --- a/drivers/scsi/aic7xxx/aic79xx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
> @@ -1250,9 +1250,8 @@ ahd_linux_register_host(struct ahd_softc *ahd, struct scsi_host_template *templa
> ahd_set_unit(ahd, ahd_linux_unit++);
> ahd_unlock(ahd, &s);
> sprintf(buf, "scsi%d", host->host_no);
> - new_name = kmalloc(strlen(buf) + 1, GFP_ATOMIC);
> + new_name = kstrdup(buf, GFP_ATOMIC);
> if (new_name != NULL) {
> - strcpy(new_name, buf);
> ahd_set_name(ahd, new_name);
> }
Remove the curly braces. And below as well.
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