Skip to content
Commit ebc95c79 authored by Enze Li's avatar Enze Li Committed by Martin K. Petersen
Browse files

scsi: sr: Add memory allocation failure handling for get_capabilities()

The function get_capabilities() has the possibility of failing to allocate
the transfer buffer but it does not currently handle this. This may lead to
exceptions when accessing the buffer.

Add error handling when memory allocation fails.

Link: https://lore.kernel.org/r/20220427025647.298358-1-lienze@kylinos.cn


Signed-off-by: default avatarEnze Li <lienze@kylinos.cn>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent bb9b9eb0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment