Re: [PATCH 01/13] a2b: add A2B driver core

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



>> …
>>> +++ b/drivers/a2b/a2b.c
>>> @@ -0,0 +1,1252 @@
>> …
>>> +static int a2b_bus_of_add_node(struct a2b_bus *bus, struct device_node *np,
>>> +                            unsigned int addr)
>>> +{
>> …
>>> +     node = kzalloc(sizeof(*node), GFP_KERNEL);
>>> +     if (IS_ERR(node))
>>> +             return -ENOMEM;
>>
>> Please improve the distinction for checks according to the handling of error/null pointers.
>
> Right, I think it returns NULL on error.

Do you see possibilities to reduce “confusion” about the properties of such a programming interface
any further?
https://elixir.bootlin.com/linux/v6.9.1/A/ident/kzalloc

Regards,
Markus





[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux