mirror of https://gitee.com/openkylin/linux.git
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
This commit is contained in:
commit
364212e0df
|
@ -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) - \
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue