Messages in this thread | | | Date | Thu, 4 Sep 2003 00:53:18 +0200 | From | Francois Romieu <> | Subject | Re: cciss error handling patch for 2.6.0-test4 |
| |
mike.miller@hp.com <mike.miller@hp.com> : > This patch was built & tested using 2.6.0-test4. It _hopefully_ cleans up the error handling in cciss_init_one(). > Please consider this for inclusion in the 2.6.0 kernel.
[...] > +clean4: > + if(hba[i]->cmd_pool_bits) > + kfree(hba[i]->cmd_pool_bits); > + if(hba[i]->cmd_pool) > + pci_free_consistent(hba[i]->pdev, > + NR_CMDS * sizeof(CommandList_struct), > + hba[i]->cmd_pool, hba[i]->cmd_pool_dhandle); > + if(hba[i]->errinfo_pool) > + pci_free_consistent(hba[i]->pdev, > + NR_CMDS * sizeof( ErrorInfo_struct), > + hba[i]->errinfo_pool, > + hba[i]->errinfo_pool_dhandle); > +clean3: > + free_irq(hba[i]->intr, hba[i]); > +clean2: > + unregister_blkdev(COMPAQ_CISS_MAJOR+i, hba[i]->devname); > +clean1: > + release_io_mem(hba[i]); > +clean0: > + free_hba(i); > + return(-1); > }
Would you mind to change the cleanX exit labels to more descriptive names ? Say err_free_hba, err_free_irq for example.
Moreover, note that the same tests (the "if"s) are done twice.
-- Ueimor - 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/
| |