From: H Hartley Sweeten Date: Fri, 25 Jan 2013 22:02:06 +0000 (-0700) Subject: staging: comedi: quatech_daqp_cs: fix possible memory dereference issue X-Git-Tag: v3.9-rc1~127^2~265 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c65c64d0f0b269b1239fdce253fd4717281cc98d;p=pandora-kernel.git staging: comedi: quatech_daqp_cs: fix possible memory dereference issue In daqp_attach(), the first options value passed in the comedi_devconfig is used as an index to the private dev_table[] in this driver. This table is used to pass the pcmcia_device to the comedi_driver. Fix the code so that the index is checked before the table is accessed so that we don't get a possible memory dereference BUG. Change the error returned to the comedi core from -EIO to -ENODEV. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed