[PATCH 06] drivers/scsi/bvme6000_scsi.c: kmalloc + memset conversion to kzalloc
- From: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>
- Date: Tue, 31 Jul 2007 19:01:57 +0200
Signed-off-by: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>
drivers/scsi/bvme6000_scsi.c | 3330 -> 3253 (-77 bytes)
drivers/scsi/bvme6000_scsi.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/bvme6000_scsi.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/bvme6000_scsi.c 2007-07-31 14:04:50.000000000 +0200
@@ -36,19 +36,18 @@ static struct platform_device *bvme6000_
static __devinit int
bvme6000_probe(struct device *dev)
{
- struct Scsi_Host * host = NULL;
+ struct Scsi_Host *host;
struct NCR_700_Host_Parameters *hostdata;
if (!MACH_IS_BVME6000)
goto out;
- hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
- if (hostdata == NULL) {
+ hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
+ if (!hostdata) {
printk(KERN_ERR "bvme6000-scsi: "
"Failed to allocate host data\n");
goto out;
}
- memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters));
/* Fill in the required pieces of hostdata */
hostdata->base = (void __iomem *)BVME_NCR53C710_BASE;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc
- From: Mariusz Kozlowski
- [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc
- Prev by Date: Re: [RFC 12/26] ext2 white-out support
- Next by Date: Re: [ck] Re: SD still better than CFS for 3d ?(was Re: 2.6.23-rc1)
- Previous by thread: [PATCH 05] drivers/mmc/core/bus.c: kmalloc + memset conversion to kzalloc
- Next by thread: [PATCH 07] drivers/block/cciss.c: kmalloc + memset conversion to kzalloc
- Index(es):
Relevant Pages
|
|