From: H Hartley Sweeten Date: Tue, 12 Jun 2012 18:58:27 +0000 (-0700) Subject: staging: comedi: only set dev->n_subdevices when kcalloc succeedes X-Git-Tag: v3.6-rc1~100^2~823 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fba1d0faf726b442ab8771d5e9fbaf5f5a4c624c;p=pandora-kernel.git staging: comedi: only set dev->n_subdevices when kcalloc succeedes It's possible for the kcalloc in comedi_alloc_subdevices to fail. Only set the dev->n_subdevices variable if the allocation is successful. Since the core sets dev->n_subdevices, remove all the places in the drivers where this variable was getting set. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Frank Mori Hess Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed