Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4413a58 authored by Chandrakanth Patil's avatar Chandrakanth Patil Committed by Martin K. Petersen
Browse files

scsi: megaraid_sas: megaraid_sas: Add check for count returned by HOST_DEVICE_LIST DCMD

parent 59db5a93
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4827,6 +4827,9 @@ megasas_host_device_list_query(struct megasas_instance *instance,
		 */
		count = le32_to_cpu(ci->count);

		if (count > (MEGASAS_MAX_PD + MAX_LOGICAL_DRIVES_EXT))
			break;

		if (megasas_dbg_lvl & LD_PD_DEBUG)
			dev_info(&instance->pdev->dev, "%s, Device count: 0x%x\n",
				 __func__, count);