Re: [PATCH 3/9] staging: ks7010: Return directly after a failed kmalloc()

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

 



>>> @@ -713,10 +713,8 @@ static int ks7010_sdio_update_index(struct ks_wlan_private *priv, u32 index)
>>>  	unsigned char *data_buf;
>>>
>>>  	data_buf = kmalloc(sizeof(u32), GFP_KERNEL);
>>> -	if (!data_buf) {
>>> -		rc = 1;
>>> -		goto error_out;
>>> -	}
>>> +	if (!data_buf)
>>> +		return 1;
>>
>> One could rather wonder why the function has such strange error values...
> 
> Agreed. Markus, can you check if we can use -ENOMEM in those places.

I find that I do not know this software good enough at the moment
so that I could safely decide on the shown special error values.
I guess that further clarification might be needed for affected
implementation details.

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



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux