On Mon, Nov 07, 2022 at 10:51:33AM +0200, Leon Romanovsky wrote: > From: Or Har-Toov <ohartoov@xxxxxxxxxx> > > Using nlmsg_put causes static analysis tools to many > false positives of not checking the return value of nlmsg_put. > > In all uses in nldev.c, payload parameter is 0 so NULL will never > be returned. So let's use __nlmsg_put function to silence the > warnings. I'd rather just add useless checks for the errors than call a private function like this. Or add some nlmsg_put_no_payload() that can't fail Jason