Prarit Bhargava wrote: > On 05/20/2011 02:33 PM, Jayamohan.Kallickal@Emulex.Com wrote: > > Thanks for the patch. Pl see my comments in line > > np. > > > diff --git a/drivers/scsi/be2iscsi/be_main.c > > b/drivers/scsi/be2iscsi/be_main.c index 24e20ba..8d71e47 100644 > > --- a/drivers/scsi/be2iscsi/be_main.c > > +++ b/drivers/scsi/be2iscsi/be_main.c > > @@ -874,16 +874,20 @@ static int beiscsi_init_irqs(struct beiscsi_hba > > *phba) > > > > struct hwi_controller *phwi_ctrlr; > > struct hwi_context_memory *phwi_context; > > int ret, msix_vec, i, j; > > > > - char desc[32]; > > > > phwi_ctrlr = phba->phwi_ctrlr; > > phwi_context = phwi_ctrlr->phwi_ctxt; > > > > if (phba->msix_enabled) { > > > > for (i = 0; i < phba->num_cpus; i++) { > > > > - sprintf(desc, "beiscsi_msix_%04x", i); > > + phba->msi_name[i] = kzalloc(BEISCSI_MSI_NAME, > > + GFP_KERNEL); > > + if (!phba->msi_name[i]) > > + goto free_msix_irqs; > > We need to ensure i != 0 before jumping to free_msix_irqs > > Will fix in next version ... I think I may have to do a bit more work > here because I just realized that if we free_irq() on a non-allocated > irq we'll get an angry message from the kernel ;) Unfortunately this > may complicate the code.... I'll rework this and see if I can come up > with something better. This could be simpler if you would use devres and devm_kzalloc() and devm_request_irq(). You simply need to return with error then and the driver core would free everything you already allocated. Eike