summaryrefslogtreecommitdiff
path: root/drivers/usb/misc/cytherm.c
diff options
context:
space:
mode:
authorRuan Jinjie <ruanjinjie@huawei.com>2023-08-04 12:32:50 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-04 15:48:55 +0300
commitf87ba66a2a1b2e1dc1c4ece51fa5db93c9cf1d43 (patch)
tree908ddbd4c996bcfdb81bc8578f678ffeab01139f /drivers/usb/misc/cytherm.c
parent3024faf74de7ed7c0f6dc29bced4dbdbd2a1eade (diff)
downloadlinux-f87ba66a2a1b2e1dc1c4ece51fa5db93c9cf1d43.tar.xz
USB: misc: Remove unnecessary NULL values
The NULL initialization of the pointers assigned by kzalloc() first is not necessary, because if the kzalloc() failed, the pointers will be assigned NULL, otherwise it works as usual. so remove it. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Link: https://lore.kernel.org/r/20230804093253.91647-3-ruanjinjie@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc/cytherm.c')
-rw-r--r--drivers/usb/misc/cytherm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/cytherm.c b/drivers/usb/misc/cytherm.c
index 9504178f5c89..875016dd073c 100644
--- a/drivers/usb/misc/cytherm.c
+++ b/drivers/usb/misc/cytherm.c
@@ -304,7 +304,7 @@ static int cytherm_probe(struct usb_interface *interface,
const struct usb_device_id *id)
{
struct usb_device *udev = interface_to_usbdev(interface);
- struct usb_cytherm *dev = NULL;
+ struct usb_cytherm *dev;
int retval = -ENOMEM;
dev = kzalloc(sizeof(struct usb_cytherm), GFP_KERNEL);