Re: [PATCH] staging: greybus: power_supply: Use struct_size() helper

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

 



Hi Johan,

On 4/4/19 1:57 AM, Johan Hovold wrote:
> 
> This patch looks good, but I noticed a bug here in the current code,
> which should be fixed before applying this clean up.
> 
> sizeof(req) should have been sizeof(*req) above.
> 

Good catch.

>> -				 sizeof(struct gb_power_supply_props_desc),
>> +				 sizeof(req),
>> +				 struct_size(resp, props, props_count),
>>  				 GFP_KERNEL);
>>  	if (!op)
>>  		return -ENOMEM;
> 
> I've just submitted a fix (and CCed you as well). 
> 
> Would you mind respinning on top of that one?
> 

Yep. I'll send v2 shortly.

Thanks
--
Gustavo
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux