diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-10-16 15:31:35 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-18 10:02:52 +0200 |
commit | f7572e93d5f6bc4f659d2a9b603574cd126482d8 (patch) | |
tree | 8c98b5169cfed95386a093e1968b206d22c44c16 /drivers/parport | |
parent | parport: Use list_for_each() helper (diff) | |
download | linux-f7572e93d5f6bc4f659d2a9b603574cd126482d8.tar.xz linux-f7572e93d5f6bc4f659d2a9b603574cd126482d8.zip |
parport: Drop 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.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231016133135.1203643-4-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.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/parport/share.c b/drivers/parport/share.c index 38780f6a9119..a9a9cb0477ea 100644 --- a/drivers/parport/share.c +++ b/drivers/parport/share.c @@ -449,13 +449,9 @@ struct parport *parport_register_port(unsigned long base, int irq, int dma, tmp->irq = irq; tmp->dma = dma; tmp->muxport = tmp->daisy = tmp->muxsel = -1; - tmp->modes = 0; INIT_LIST_HEAD(&tmp->list); - tmp->devices = tmp->cad = NULL; - tmp->flags = 0; tmp->ops = ops; tmp->physport = tmp; - memset(tmp->probe_info, 0, 5 * sizeof(struct parport_device_info)); rwlock_init(&tmp->cad_lock); spin_lock_init(&tmp->waitlist_lock); spin_lock_init(&tmp->pardevice_lock); |