summaryrefslogtreecommitdiff
path: root/drivers/parport
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-10-18 17:59:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-22 00:04:23 +0300
commit421359cbdbdcaea93b83e1e6b61eb261b75b1998 (patch)
treed5fb629641010cd05708c8d5c6dcffc745d0efc0 /drivers/parport
parent12280cc708f28357e7ad85bab2bcc3715e59a8f7 (diff)
downloadlinux-421359cbdbdcaea93b83e1e6b61eb261b75b1998.tar.xz
parport: Drop even more unneeded NULL or 0 assignments
kzalloc() gives us a zeroed memory, no need to explicitly assing 0 or NULL or similar to the members of the data structure that has been allocated with the above mentioned API. Note, the initializstion of full_list member is not needed anymore as list_add_tail will rewrite the contents of the prev and next pointers. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20231018145948.1367648-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/parport')
-rw-r--r--drivers/parport/share.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/parport/share.c b/drivers/parport/share.c
index 048a459ce4b0..e21831d93305 100644
--- a/drivers/parport/share.c
+++ b/drivers/parport/share.c
@@ -459,7 +459,6 @@ struct parport *parport_register_port(unsigned long base, int irq, int dma,
sema_init(&tmp->ieee1284.irq, 0);
tmp->spintime = parport_default_spintime;
atomic_set(&tmp->ref_count, 1);
- INIT_LIST_HEAD(&tmp->full_list);
/* Search for the lowest free parport number. */
@@ -489,8 +488,6 @@ struct parport *parport_register_port(unsigned long base, int irq, int dma,
/* assume the worst */
tmp->probe_info[device].class = PARPORT_CLASS_LEGACY;
- tmp->waithead = tmp->waittail = NULL;
-
ret = device_register(&tmp->bus_dev);
if (ret) {
put_device(&tmp->bus_dev);