commit | 7f801c41714729f7741a042de839918be2bb56f0 | [log] [tgz] |
---|---|---|
author | H Hartley Sweeten <hartleys@visionengravers.com> | Tue Jun 12 11:57:45 2012 -0700 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Tue Jun 12 14:44:03 2012 -0700 |
tree | d3d3f3d65a121e9d2c64b3177ea852f5914ea729 | |
parent | 8b9ba6e5efc3213f384cda155861a4f7ae903365 [diff] |
staging: comedi: sanity check num_subdevices parameter in comedi_alloc_subdevices It's possible for a couple of the comedi drivers to incorrectly call comedi_alloc_subdevices with num_subdevices = 0. Add a sanity check before doing the kcalloc. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbot@mev.co.uk> Cc: Frank Mori Hess <kmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>