mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
[SCSI] isci: Fix NULL ptr dereference when no firmware is being loaded
NULL orom ptr passed in for verification which caused page fault. We will set a default version when we don't have orom struct. Reported-by: Dan Melnic <dan@seamicro.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
a92fa25c63
commit
6d7938f46f
1 changed files with 3 additions and 1 deletions
|
@ -1848,9 +1848,11 @@ static enum sci_status sci_oem_parameters_set(struct isci_host *ihost)
|
|||
if (state == SCIC_RESET ||
|
||||
state == SCIC_INITIALIZING ||
|
||||
state == SCIC_INITIALIZED) {
|
||||
u8 oem_version = pci_info->orom ? pci_info->orom->hdr.version :
|
||||
ISCI_ROM_VER_1_0;
|
||||
|
||||
if (sci_oem_parameters_validate(&ihost->oem_parameters,
|
||||
pci_info->orom->hdr.version))
|
||||
oem_version))
|
||||
return SCI_FAILURE_INVALID_PARAMETER_VALUE;
|
||||
|
||||
return SCI_SUCCESS;
|
||||
|
|
Loading…
Reference in a new issue