mirror of https://gitee.com/openkylin/linux.git
staging: unisys: visorhba: switch success handling to error handling
Addresses code audit feeback to switch from success handling to error handling in visorhba_main.c/process_disk_notify(). Signed-off-by: David Binder <david.binder@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
825157aeda
commit
3b5e11d7f5
|
@ -950,14 +950,15 @@ static void process_disk_notify(struct Scsi_Host *shost,
|
||||||
struct diskaddremove *dar;
|
struct diskaddremove *dar;
|
||||||
|
|
||||||
dar = kzalloc(sizeof(*dar), GFP_ATOMIC);
|
dar = kzalloc(sizeof(*dar), GFP_ATOMIC);
|
||||||
if (dar) {
|
if (!dar)
|
||||||
dar->add = cmdrsp->disknotify.add;
|
return;
|
||||||
dar->shost = shost;
|
|
||||||
dar->channel = cmdrsp->disknotify.channel;
|
dar->add = cmdrsp->disknotify.add;
|
||||||
dar->id = cmdrsp->disknotify.id;
|
dar->shost = shost;
|
||||||
dar->lun = cmdrsp->disknotify.lun;
|
dar->channel = cmdrsp->disknotify.channel;
|
||||||
queue_disk_add_remove(dar);
|
dar->id = cmdrsp->disknotify.id;
|
||||||
}
|
dar->lun = cmdrsp->disknotify.lun;
|
||||||
|
queue_disk_add_remove(dar);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue