Re: [PATCH] watchdog: core: Fix devres_alloc() allocation size

2016-08-11 Thread Neil Armstrong
On 08/10/2016 07:34 AM, Guenter Roeck wrote: > Coverity reports: > > Passing argument 152UL /* sizeof (*wdd) */ to function __devres_alloc_node > and then casting the return value to struct watchdog_device ** is > suspicious. > > Allocation size needs to be sizeof(*rcwdd), not sizeof(*wdd). > >

[PATCH] watchdog: core: Fix devres_alloc() allocation size

2016-08-10 Thread Guenter Roeck
Coverity reports: Passing argument 152UL /* sizeof (*wdd) */ to function __devres_alloc_node and then casting the return value to struct watchdog_device ** is suspicious. Allocation size needs to be sizeof(*rcwdd), not sizeof(*wdd). Fixes: 83fbae5a148c ("watchdog: Add a device managed API for ..