staging: comedi: das16: tidy up user ai/ao range initialization
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 29 Jul 2013 21:07:53 +0000 (14:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Aug 2013 00:38:09 +0000 (17:38 -0700)
commit05591eaf71a9c2ad57e2d59a398ade423a9bda00
tree2dabace845523d050fe5ab2dc005fc4175a4cd36
parent3ffb03e62a12d82f7ce1b1aaa471f780e2e42743
staging: comedi: das16: tidy up user ai/ao range initialization

The allocation of the user range tables could fail. Make sure to check
for it.

Change the kmalloc()'s to kzalloc()'s to make sure the allocated range
tables are initialized to a known state.

Change the local variables so they can be used for both the ai and ao
range initialization and use shorter names to keep the lines < 80 chars.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/das16.c