From: Ian Abbott Date: Wed, 19 May 2010 13:10:01 +0000 (+0100) Subject: Staging: comedi: serial2002: handle allocation failures on 'open' X-Git-Tag: v2.6.36-rc1~520^2~1^2~511 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e7f2256883c954691e5d395d471e0f125f6b30b;p=pandora-kernel.git Staging: comedi: serial2002: handle allocation failures on 'open' The comedi device 'open' method for the serial2002 driver frees any old 'maxdata_list' and 'range_table_list' arrays belonging to a subdevice and allocates them again, but was missing checks for allocation failure. If an allocation fails, free the 'maxdata_list' and 'range_table_list' arrays for all subdevices and return an error. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed