Skip to content

Commit

Permalink
staging: comedi: remove memset() call from comedi_device_init()
Browse files Browse the repository at this point in the history
`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>
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Apr 5, 2013
1 parent 9162220 commit 4ca7da6
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4ca7da6

Please sign in to comment.