Re: [PATCH] scsi: mpt2sas: mpt2sas_base.c: Fix for possible null pointer dereference

2014-07-03 Thread Rickard Strandqvist
2014-07-03 19:45 GMT+02:00 Joe Lawrence : > On Wed, 28 May 2014, Christoph Hellwig wrote: > >> > - ioc_status = le16_to_cpu(mpi_reply->IOCStatus) & MPI2_IOCSTATUS_MASK; >> > + if (mpi_reply) { >> > + ioc_status = le16_to_cpu(mpi_reply->IOCStatus) & >> > MPI2_IOCSTATUS_MASK; >> > +

Re: [PATCH] scsi: mpt2sas: mpt2sas_base.c: Fix for possible null pointer dereference

2014-07-03 Thread Joe Lawrence
On Wed, 28 May 2014, Christoph Hellwig wrote: > > - ioc_status = le16_to_cpu(mpi_reply->IOCStatus) & MPI2_IOCSTATUS_MASK; > > + if (mpi_reply) { > > + ioc_status = le16_to_cpu(mpi_reply->IOCStatus) & > > MPI2_IOCSTATUS_MASK; > > + } > > > > if (ioc_status !=

Re: [PATCH] scsi: mpt2sas: mpt2sas_base.c: Fix for possible null pointer dereference

2014-07-03 Thread Joe Lawrence
On Wed, 28 May 2014, Christoph Hellwig wrote: - ioc_status = le16_to_cpu(mpi_reply-IOCStatus) MPI2_IOCSTATUS_MASK; + if (mpi_reply) { + ioc_status = le16_to_cpu(mpi_reply-IOCStatus) MPI2_IOCSTATUS_MASK; + } if (ioc_status != MPI2_IOCSTATUS_SUCCESS)

Re: [PATCH] scsi: mpt2sas: mpt2sas_base.c: Fix for possible null pointer dereference

2014-07-03 Thread Rickard Strandqvist
2014-07-03 19:45 GMT+02:00 Joe Lawrence joe.lawre...@stratus.com: On Wed, 28 May 2014, Christoph Hellwig wrote: - ioc_status = le16_to_cpu(mpi_reply-IOCStatus) MPI2_IOCSTATUS_MASK; + if (mpi_reply) { + ioc_status = le16_to_cpu(mpi_reply-IOCStatus) MPI2_IOCSTATUS_MASK;

Re: [PATCH] scsi: mpt2sas: mpt2sas_base.c: Fix for possible null pointer dereference

2014-05-28 Thread Christoph Hellwig
> - ioc_status = le16_to_cpu(mpi_reply->IOCStatus) & MPI2_IOCSTATUS_MASK; > + if (mpi_reply) { > + ioc_status = le16_to_cpu(mpi_reply->IOCStatus) & > MPI2_IOCSTATUS_MASK; > + } > > if (ioc_status != MPI2_IOCSTATUS_SUCCESS) > ioc->port_enable_failed =

Re: [PATCH] scsi: mpt2sas: mpt2sas_base.c: Fix for possible null pointer dereference

2014-05-28 Thread Christoph Hellwig
- ioc_status = le16_to_cpu(mpi_reply-IOCStatus) MPI2_IOCSTATUS_MASK; + if (mpi_reply) { + ioc_status = le16_to_cpu(mpi_reply-IOCStatus) MPI2_IOCSTATUS_MASK; + } if (ioc_status != MPI2_IOCSTATUS_SUCCESS) ioc-port_enable_failed = 1;

[PATCH] scsi: mpt2sas: mpt2sas_base.c: Fix for possible null pointer dereference

2014-05-18 Thread Rickard Strandqvist
There is otherwise a risk of a possible null pointer dereference. Was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/scsi/mpt2sas/mpt2sas_base.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH] scsi: mpt2sas: mpt2sas_base.c: Fix for possible null pointer dereference

2014-05-18 Thread Rickard Strandqvist
There is otherwise a risk of a possible null pointer dereference. Was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/scsi/mpt2sas/mpt2sas_base.c |4 +++- 1 file changed, 3