mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 05:22:19 -04:00
staging: comedi: remove memset() call from comedi_device_init()
`comedi_device_init()` is only called from one place (`comedi_alloc_board_minor()`) and the `struct comedi_device` has already been zeroed out by `kzalloc()`. Don't bother zeroing it out again with `memset()`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9162220068
commit
4ca7da6e82
@@ -2249,7 +2249,6 @@ EXPORT_SYMBOL(comedi_event);
|
||||
|
||||
static void comedi_device_init(struct comedi_device *dev)
|
||||
{
|
||||
memset(dev, 0, sizeof(*dev));
|
||||
spin_lock_init(&dev->spinlock);
|
||||
mutex_init(&dev->mutex);
|
||||
dev->minor = -1;
|
||||
|
||||
Reference in New Issue
Block a user