mpt3sas: Fix static analyzer(coverity) tool identified defects
1.Wrong size of argument is being passed The size of struct being passed as an argument to memset func and area of memory being pointed by an instance of struct in memset func should be of same structure type. 2.Dereference null return value 3.Array compared against '0' Check whether value pointed by particular index of an array is null or not in "if" statement. Signed-off-by: Suganath prabu Subramani <suganath-prabu.subramani@avagotech.com> Signed-off-by: Chaitra P B <chaitra.basappa@avagotech.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
ce61c57427
commit
869817f9e9
@@ -401,7 +401,8 @@ mpt3sas_ctl_event_callback(struct MPT3SAS_ADAPTER *ioc, u8 msix_index,
|
||||
Mpi2EventNotificationReply_t *mpi_reply;
|
||||
|
||||
mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply);
|
||||
mpt3sas_ctl_add_to_event_log(ioc, mpi_reply);
|
||||
if (mpi_reply)
|
||||
mpt3sas_ctl_add_to_event_log(ioc, mpi_reply);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user