Re: [PATCH] ata: pata_octeon_cf: fix error return code in octeon_cf_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/26/23 00:23, Sergey Shtylyov wrote:
> On 7/25/23 3:28 PM, Yang Yingliang wrote:
> 
>> The 'rv' will be set to 0 after calling of_property_read_reg(),
>> return correct error code in the error path.
>>
>> Fixes: d0b2461678b1 ("ata: Use of_property_read_reg() to parse "reg"")
>> Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
>> ---
>>  drivers/ata/pata_octeon_cf.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
>> index ff538b858928..6b46e20b3830 100644
>> --- a/drivers/ata/pata_octeon_cf.c
>> +++ b/drivers/ata/pata_octeon_cf.c
>> @@ -893,12 +893,12 @@ static int octeon_cf_probe(struct platform_device *pdev)
>>  	cs0 = devm_ioremap(&pdev->dev, res_cs0->start,
>>  				   resource_size(res_cs0));
>>  	if (!cs0)
>> -		return rv;
>> +		return -EINVAL;
> 
>    Hm, missed this one! Should be -ENOMEM as well.

Will fix that when applying.

> 
>>  
>>  	/* allocate host */
>>  	host = ata_host_alloc(&pdev->dev, 1);
>>  	if (!host)
>> -		return rv;
>> +		return -ENOMEM;
> [...]
> 
> MBR, Sergey

-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux