Re: staging: lustre: Optimize error handling in class_register_type()

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

 



> NAK.
> when you do this, the next statement below breaks:

I wonder about this conclusion.


>> 	type = kzalloc(sizeof(*type), GFP_NOFS);
>> 	if (!type)
>> -		return rc;
>> +		return -ENOMEM;
>>
>> 	type->typ_dt_ops = kzalloc(sizeof(*type->typ_dt_ops), GFP_NOFS);
>> 	if (!type->typ_dt_ops) {
> …
>                 goto failed;
> 
>  failed:
> …
> return rc;
> 
> So we are now returning an unitialized rc, did you get a gcc warning about it when compiling?

I do not get such an impression if my corresponding update suggestion
"[PATCH 04/12] staging: lustre: Split a condition check in class_register_type()"
will be considered for this use case once more.
https://lkml.org/lkml/2016/7/26/462
https://www.mail-archive.com/linux-kernel@xxxxxxxxxxxxxxx/msg1197227.html

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