Re: [PATCH] scsi: mpi3mr: Handle SAS port and rphy allocation failures

From: Markus Elfring

Date: Wed Aug 19 2026 - 03:19:34 EST


> Check the return value of sas_port_alloc_num() and handle failures
> before attempting to add the port.
>
> Free the SAS port if sas_port_add() fails. Also handle failures from
> sas_end_device_alloc() and sas_expander_alloc() by removing the PHYs
> from the port, deleting the SAS port, and returning failure.


How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.2#n145
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v7.2#n34

Regards,
Markus