RDMA/nldev: Add NULL check to silence false warnings
authorOr Har-Toov <ohartoov@nvidia.com>
Mon, 28 Nov 2022 11:52:45 +0000 (13:52 +0200)
committerLeon Romanovsky <leon@kernel.org>
Wed, 30 Nov 2022 08:33:12 +0000 (10:33 +0200)
commit67e6272d53386f9708f91c4d0015c4a1c470eef5
tree669df735b6f176c2cea198458e0beebd3db2b4d0
parent2d6c66f5253e7d168a76048d18e1209c52f98a2b
RDMA/nldev: Add NULL check to silence false warnings

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 add useless checks to silence the warnings.

Signed-off-by: Or Har-Toov <ohartoov@nvidia.com>
Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
Link: https://lore.kernel.org/r/bd924da89d5b4f5291a4a01d9b5ae47c0a9b6a3f.1669636336.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/nldev.c