Hello Pedro,
Technically speaking  ASSERT (Private != NULL) doesn't cover this branch.
It should crash before as result of UninstallMultipleProtocolInterfaces() call.
Obviously it make no sense in release target (under normal condition
when assertion is turned off), while this code does.
But I would suggest to remove ASSERT (Private != NULL) as well since
it is useless also.
It needs to be very lucky to get NULL as result of BASE_CR(), but
actually SATA_CONTROLLER_PRIVATE_DATA_FROM_THIS() and CR()
definition care about this. There will be assert if signature doesn't
match to dereferenced memory area before Private != NULL check.

In fact, this patch just reduces indentation level by removing useless checks.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#104297): https://edk2.groups.io/g/devel/message/104297
Mute This Topic: https://groups.io/mt/98771780/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to