summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-05 12:30:28 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-05 12:30:28 -0700
commit364212e0df05efee43d87270b476fc5c9ad2c651 (patch)
tree4fa80b5ebbb92fe46a836e68c0e4d38f0885e7a6 /drivers
parentfec468b0c9e0a75b89514408e3b35b1576b57071 (diff)
parent2b0dd802ba1ff9b7001f5f9bd9b4d192a4aabf81 (diff)
downloadblackbird-op-linux-364212e0df05efee43d87270b476fc5c9ad2c651.tar.gz
blackbird-op-linux-364212e0df05efee43d87270b476fc5c9ad2c651.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6: [PATCH] pcmcia: fix zeroing of cm4000_cs.c data [PATCH] pcmcia: missing pcmcia_get_socket() result check
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c2
-rw-r--r--drivers/pcmcia/ds.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index 128b2632512d..eab5394da666 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -149,7 +149,7 @@ struct cm4000_dev {
#define ZERO_DEV(dev) \
memset(&dev->atr_csum,0, \
sizeof(struct cm4000_dev) - \
- /*link*/ sizeof(struct pcmcia_device) - \
+ /*link*/ sizeof(struct pcmcia_device *) - \
/*node*/ sizeof(dev_node_t) - \
/*atr*/ MAX_ATR*sizeof(char) - \
/*rbuf*/ 512*sizeof(char) - \
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 48d3b3d30c21..74b3124e8247 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -1143,6 +1143,12 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority)
{
struct pcmcia_socket *s = pcmcia_get_socket(skt);
+ if (!s) {
+ printk(KERN_ERR "PCMCIA obtaining reference to socket %p " \
+ "failed, event 0x%x lost!\n", skt, event);
+ return -ENODEV;
+ }
+
ds_dbg(1, "ds_event(0x%06x, %d, 0x%p)\n",
event, priority, skt);
OpenPOWER on IntegriCloud