mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 20:53:53 +08:00
aacraid: Removed unnecessary checks for NULL
Current driver checks for NULL return from aac_fib_alloc_tag, but it not possible for it to return NULL. Fixed by: Remove all the checks for NULL returns from aac_fib_alloc_tag Suggested-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
1354379b13
commit
da31df8c72
@ -555,8 +555,6 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd)
|
||||
dev = (struct aac_dev *)scsicmd->device->host->hostdata;
|
||||
|
||||
cmd_fibcontext = aac_fib_alloc_tag(dev, scsicmd);
|
||||
if (!cmd_fibcontext)
|
||||
return -ENOMEM;
|
||||
|
||||
aac_fib_init(cmd_fibcontext);
|
||||
dinfo = (struct aac_get_name *) fib_data(cmd_fibcontext);
|
||||
@ -1037,8 +1035,6 @@ static int aac_get_container_serial(struct scsi_cmnd * scsicmd)
|
||||
dev = (struct aac_dev *)scsicmd->device->host->hostdata;
|
||||
|
||||
cmd_fibcontext = aac_fib_alloc_tag(dev, scsicmd);
|
||||
if (!cmd_fibcontext)
|
||||
return -ENOMEM;
|
||||
|
||||
aac_fib_init(cmd_fibcontext);
|
||||
dinfo = (struct aac_get_serial *) fib_data(cmd_fibcontext);
|
||||
@ -1950,10 +1946,6 @@ static int aac_read(struct scsi_cmnd * scsicmd)
|
||||
* Alocate and initialize a Fib
|
||||
*/
|
||||
cmd_fibcontext = aac_fib_alloc_tag(dev, scsicmd);
|
||||
if (!cmd_fibcontext) {
|
||||
printk(KERN_WARNING "aac_read: fib allocation failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
status = aac_adapter_read(cmd_fibcontext, scsicmd, lba, count);
|
||||
|
||||
@ -2048,16 +2040,6 @@ static int aac_write(struct scsi_cmnd * scsicmd)
|
||||
* Allocate and initialize a Fib then setup a BlockWrite command
|
||||
*/
|
||||
cmd_fibcontext = aac_fib_alloc_tag(dev, scsicmd);
|
||||
if (!cmd_fibcontext) {
|
||||
/* FIB temporarily unavailable,not catastrophic failure */
|
||||
|
||||
/* scsicmd->result = DID_ERROR << 16;
|
||||
* scsicmd->scsi_done(scsicmd);
|
||||
* return 0;
|
||||
*/
|
||||
printk(KERN_WARNING "aac_write: fib allocation failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
status = aac_adapter_write(cmd_fibcontext, scsicmd, lba, count, fua);
|
||||
|
||||
@ -2283,8 +2265,6 @@ static int aac_start_stop(struct scsi_cmnd *scsicmd)
|
||||
* Allocate and initialize a Fib
|
||||
*/
|
||||
cmd_fibcontext = aac_fib_alloc_tag(aac, scsicmd);
|
||||
if (!cmd_fibcontext)
|
||||
return SCSI_MLQUEUE_HOST_BUSY;
|
||||
|
||||
aac_fib_init(cmd_fibcontext);
|
||||
|
||||
@ -3184,8 +3164,6 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd)
|
||||
* Allocate and initialize a Fib then setup a BlockWrite command
|
||||
*/
|
||||
cmd_fibcontext = aac_fib_alloc_tag(dev, scsicmd);
|
||||
if (!cmd_fibcontext)
|
||||
return -1;
|
||||
|
||||
status = aac_adapter_scsi(cmd_fibcontext, scsicmd);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user