[PATCH 3/9] usb: vhci-hcd: Simplify NULL comparison
From: Cristian Ciocaltea
Date: Thu Jul 17 2025 - 11:56:06 EST
Use the shorter variants as suggested by checkpatch.pl:
CHECK: Comparison to NULL could be written "!c"
CHECK: Comparison to NULL could be written "!vhcis"
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxxxxxx>
---
drivers/usb/usbip/vhci_hcd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
index f58ba3b5ed50c5cc68d2180a4df78ab4a5f5061d..7e0f11fdbf4fe919265db31768c3a19d27dbdd18 100644
--- a/drivers/usb/usbip/vhci_hcd.c
+++ b/drivers/usb/usbip/vhci_hcd.c
@@ -1133,7 +1133,7 @@ static int hcd_name_to_id(const char *name)
int ret;
c = strchr(name, '.');
- if (c == NULL)
+ if (!c)
return 0;
ret = kstrtol(c + 1, 10, &val);
@@ -1523,7 +1523,7 @@ static int __init vhci_hcd_init(void)
vhci_num_controllers = 1;
vhcis = kcalloc(vhci_num_controllers, sizeof(struct vhci), GFP_KERNEL);
- if (vhcis == NULL)
+ if (!vhcis)
return -ENOMEM;
ret = platform_driver_register(&vhci_driver);
--
2.50.0