In the Linux kernel, the following vulnerability has been resolved:
scsi: mpt3sas: Fix NULL pointer access in mpt3sastransportport_add()
Port is allocated by sasportallocnum() and rphy is allocated by either sasenddevicealloc() or sasexpanderalloc(), all of which may return NULL. So we need to check the rphy to avoid possible NULL pointer access.
If sasrphyadd() returned with failure, rphy is set to NULL. We would access the rphy in the following lines which would also result NULL pointer access.