diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/DAC960.c | 31 | ||||
-rw-r--r-- | drivers/block/cciss.c | 12 | ||||
-rw-r--r-- | drivers/block/viodasd.c | 8 |
3 files changed, 19 insertions, 32 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 3760edfdc65c..70eaa5c7ac08 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c @@ -417,14 +417,12 @@ static void DAC960_DestroyAuxiliaryStructures(DAC960_Controller_T *Controller) * Remember the beginning of the group, but don't free it * until we've reached the beginning of the next group. */ - if (CommandGroup != NULL) - kfree(CommandGroup); - CommandGroup = Command; + kfree(CommandGroup); + CommandGroup = Command; } Controller->Commands[i] = NULL; } - if (CommandGroup != NULL) - kfree(CommandGroup); + kfree(CommandGroup); if (Controller->CombinedStatusBuffer != NULL) { @@ -435,30 +433,23 @@ static void DAC960_DestroyAuxiliaryStructures(DAC960_Controller_T *Controller) if (ScatterGatherPool != NULL) pci_pool_destroy(ScatterGatherPool); - if (Controller->FirmwareType == DAC960_V1_Controller) return; + if (Controller->FirmwareType == DAC960_V1_Controller) + return; if (RequestSensePool != NULL) pci_pool_destroy(RequestSensePool); - for (i = 0; i < DAC960_MaxLogicalDrives; i++) - if (Controller->V2.LogicalDeviceInformation[i] != NULL) - { + for (i = 0; i < DAC960_MaxLogicalDrives; i++) { kfree(Controller->V2.LogicalDeviceInformation[i]); Controller->V2.LogicalDeviceInformation[i] = NULL; - } + } for (i = 0; i < DAC960_V2_MaxPhysicalDevices; i++) { - if (Controller->V2.PhysicalDeviceInformation[i] != NULL) - { - kfree(Controller->V2.PhysicalDeviceInformation[i]); - Controller->V2.PhysicalDeviceInformation[i] = NULL; - } - if (Controller->V2.InquiryUnitSerialNumber[i] != NULL) - { - kfree(Controller->V2.InquiryUnitSerialNumber[i]); - Controller->V2.InquiryUnitSerialNumber[i] = NULL; - } + kfree(Controller->V2.PhysicalDeviceInformation[i]); + Controller->V2.PhysicalDeviceInformation[i] = NULL; + kfree(Controller->V2.InquiryUnitSerialNumber[i]); + Controller->V2.InquiryUnitSerialNumber[i] = NULL; } } diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 486b6e1c7dfb..a97c80b57737 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1096,14 +1096,11 @@ static int cciss_ioctl(struct inode *inode, struct file *filep, cleanup1: if (buff) { for(i=0; i<sg_used; i++) - if(buff[i] != NULL) - kfree(buff[i]); + kfree(buff[i]); kfree(buff); } - if (buff_size) - kfree(buff_size); - if (ioc) - kfree(ioc); + kfree(buff_size); + kfree(ioc); return(status); } default: @@ -3034,8 +3031,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, return(1); clean4: - if(hba[i]->cmd_pool_bits) - kfree(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), diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c index 709f809f79f1..2d518aa2720a 100644 --- a/drivers/block/viodasd.c +++ b/drivers/block/viodasd.c @@ -45,10 +45,10 @@ #include <asm/uaccess.h> #include <asm/vio.h> -#include <asm/iSeries/HvTypes.h> -#include <asm/iSeries/HvLpEvent.h> -#include <asm/iSeries/HvLpConfig.h> -#include <asm/iSeries/vio.h> +#include <asm/iseries/hv_types.h> +#include <asm/iseries/hv_lp_event.h> +#include <asm/iseries/hv_lp_config.h> +#include <asm/iseries/vio.h> MODULE_DESCRIPTION("iSeries Virtual DASD"); MODULE_AUTHOR("Dave Boutcher"); |