ionic: Don't check null when calling vfree()
authorBrett Creeley <brett.creeley@amd.com>
Mon, 4 Dec 2023 21:09:34 +0000 (13:09 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 6 Dec 2023 04:49:51 +0000 (20:49 -0800)
commit2d0b80c3a550f7828f26dba029c2b9346be789af
tree25c145970db36559d060c406e90779b6814507ac
parent46ca79d28fd7f2bbccf226fc0be59c2bd8d63dfe
ionic: Don't check null when calling vfree()

vfree() checks for null internally, so there's no need to
check in the caller. So, always vfree() on variables
allocated with valloc(). If the variables are never
alloc'd vfree() is still safe.

Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Link: https://lore.kernel.org/r/20231204210936.16587-4-shannon.nelson@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/pensando/ionic/ionic_lif.c