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;
>> > +
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 !=
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)
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;
> - 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 =
- 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;
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
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
8 matches
Mail list logo