]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
mpt3sas: Fix static analyzer(coverity) tool identified defects
authorSuganath prabu Subramani <suganath-prabu.subramani@avagotech.com>
Thu, 28 Jan 2016 06:37:00 +0000 (12:07 +0530)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:19:54 +0000 (10:19 +0100)
commit9b58810147bde0b18a9dc6ed4e55ad5e24ea3661
treee2320d4eebd14e6f71a2241fd0658b0c810ab95d
parent249df15e07049478abd02e8757745905030672a0
mpt3sas: Fix static analyzer(coverity) tool identified defects

BugLink: http://bugs.launchpad.net/bugs/1512221
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>
(cherry picked from commit dc2ed1660060a04ae9857047ace1169bddeb2ef6)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/scsi/mpt3sas/mpt3sas_ctl.c
drivers/scsi/mpt3sas/mpt3sas_scsih.c
drivers/scsi/mpt3sas/mpt3sas_transport.c