pcmcia: Fix requery
authorAlan Cox <alan@linux.intel.com>
Wed, 10 Dec 2014 15:06:40 +0000 (15:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Jan 2015 13:04:12 +0000 (05:04 -0800)
commit8402641b2dc73748dde81e3513ac61c8436be3cb
tree1b07dd8997e0e5c9091da5f877676213cb494810
parentb38a4bd319e615b4eb4be9d8c0d5ddc13113c768
pcmcia: Fix requery

The requery logic goes off and attempts to read the CIS of empty slots. In
most cases this happens not to do any harm - but not all!

Add the missing check and also a WARN() to catch any other offenders.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pcmcia/cistpl.c
drivers/pcmcia/ds.c