i2c_new_{secondary_device,dummy,device}() return type.

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

 



Hi Wolfram,

As part of my work looking at using i2c_new_secondary_device() to move address
mappings into the device tree, it has become evident that the return code of the
i2c_new_secondary_device() is obfuscated, and is simply a valid client - or NULL.

This means that we must 'guess' as to whether the device failed due to a memory
allocation, or if the device address was already in use (perhaps a more common
failure).

Because of this - I would like to see the return codes of
i2c_new_secondary_device(), ic2_new_dummy(), and therefore i2c_new_device()
support returning ERR_PTR()s rather than a client or NULL.

These functions are used fairly extensively - thus it will be a fair bit of work
(or a good coccinelle script) - So I'd like to ask your opinion on the validity
of this task before I commence anything down that rabbit hole!

Any comments? Pre-ack/nack? (from anyone?)

--
Regards

Kieran Bingham



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux