Search Linux Wireless

Re: [PATCH 1/2] rt2x00: rt2800pci: verify ioremap return value

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

 



2012.12.19. 12:05 keltezéssel, Jones Desougi írta:
> Hi Gabor,
> 
> One thing:
> 
> On 12/18/2012 05:22 PM, Gabor Juhos wrote:
>> An ioremap call is allowed to fail, however
>> the return value of that is not checked in
>> the 'rt2800pci_read_eeprom_soc' function.
>>
>> The patch adds the missing check, and makes
>> the function return an int value. The patch
>> also converts the 'rt2800_read_eeprom' and
>> 'rt2800_ops.read_eeprom' functions to return
>> an int value, so the error value can be
>> propagated up to the 'rt2800_validate_eeprom'
>> function.
>>
>> Signed-off-by: Gabor Juhos <juhosg@xxxxxxxxxxx>

>> +static int rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
>>  {
>>  	void __iomem *base_addr = ioremap(0x1F040000, EEPROM_SIZE);
>>  
>> +	if (!base_addr)
>> +		return -ENOMEM;
>> +
>>  	memcpy_fromio(rt2x00dev->eeprom, base_addr, EEPROM_SIZE);
>>  
>>  	iounmap(base_addr);
>>  }
> 
> Missing return at the end, since it should now return an int.

You are right.

> Even if this is gone with the second patch.

I will post an updated version of the patch-set anyway and will fix this.

Thank you for the review!

-Gabor
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux