summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Shahid <mdshahid03@gmail.com>2026-07-03 16:29:37 +0530
committerLee Jones <lee@kernel.org>2026-07-30 14:32:51 +0100
commit733fbd0d1198836b71e54a0d3078cf9df2cd132c (patch)
treedf972ceef5a286f54f966b0914e1e04342f7199b
parent0f2da45318c2e970c59da0c03b01a564ce60a980 (diff)
downloadlinux-next-733fbd0d1198836b71e54a0d3078cf9df2cd132c.tar.gz
linux-next-733fbd0d1198836b71e54a0d3078cf9df2cd132c.zip
mfd: viperboard: Remove redundant NULL check before kfree()
kfree() safely handles NULL pointers, so the explicit NULL check before calling kfree() is unnecessary. This issue was reported by ifnullfree.cocci. Signed-off-by: Mohammad Shahid <mdshahid03@gmail.com> Link: https://patch.msgid.link/20260703105937.62541-1-mdshahid03@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
-rw-r--r--drivers/mfd/viperboard.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mfd/viperboard.c b/drivers/mfd/viperboard.c
index 888737b8e7be..36be8e69f45c 100644
--- a/drivers/mfd/viperboard.c
+++ b/drivers/mfd/viperboard.c
@@ -96,8 +96,7 @@ static int vprbrd_probe(struct usb_interface *interface,
return 0;
error:
- if (vb)
- kfree(vb);
+ kfree(vb);
return ret;
}