Re: [PATCH] spapr: DRC lookup cannot fail

2020-12-15 Thread David Gibson
On Tue, Dec 15, 2020 at 06:36:51PM +0100, Greg Kurz wrote: > All memory DRC objects are created during machine init. It is thus safe > to assume spapr_drc_by_id() cannot return NULL when hot-plug/unplugging > memory. > > Make this clear with an assertion, like the code already does a few lines >

[PATCH] spapr: DRC lookup cannot fail

2020-12-15 Thread Greg Kurz
All memory DRC objects are created during machine init. It is thus safe to assume spapr_drc_by_id() cannot return NULL when hot-plug/unplugging memory. Make this clear with an assertion, like the code already does a few lines above when looping over memory DRCs. This fixes Coverity reports