lkml.org 
[lkml]   [2022]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] scsi: sr: add handling of memory allocation failure in get_capabilities
Hi Martin,

Thank you for the review. I've fixed the issue you pointed out.
v2 of this patch is here:
https://lore.kernel.org/all/20220427025647.298358-1-lienze@kylinos.cn/

Thanks,
Enze

>Enze,
>
>> @@ -669,8 +669,9 @@ static int sr_probe(struct device *dev)
>>
>> sdev->sector_size = 2048; /* A guess, just in case */
>>
>> - /* FIXME: need to handle a get_capabilities failure properly
>> ?? */
>> - get_capabilities(cd);
>> + error = -ENOMEM;
>> + if (get_capabilities(cd))
>> + goto fail_put;
>
>Shouldn't this be 'goto fail_minor;'?
>
>--
>Martin K. Petersen Oracle Linux Engineering

\
 
 \ /
  Last update: 2022-04-27 05:04    [W:0.093 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site