aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorFlorin Malita <fmalita@gmail.com>2006-05-24 21:21:31 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2006-06-01 18:56:17 -0400
commit1617406a763870a84ffe6bba3659f30f96ac4a61 (patch)
tree8cb1b005e2e0769f8fdefe05eda13c44aad61c36 /drivers/pcmcia
parentba8f5baba79da8eb502f8534c3a8ecb64aceb790 (diff)
[PATCH] pcmcia: missing pcmcia_get_socket() result check
The result of pcmcia_get_socket() may be NULL but ds_event() uses it without checking. Coverity CID: 436. Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/ds.c6
1 files changed, 6 insertions, 0 deletions
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)
1143{ 1143{
1144 struct pcmcia_socket *s = pcmcia_get_socket(skt); 1144 struct pcmcia_socket *s = pcmcia_get_socket(skt);
1145 1145
1146 if (!s) {
1147 printk(KERN_ERR "PCMCIA obtaining reference to socket %p " \
1148 "failed, event 0x%x lost!\n", skt, event);
1149 return -ENODEV;
1150 }
1151
1146 ds_dbg(1, "ds_event(0x%06x, %d, 0x%p)\n", 1152 ds_dbg(1, "ds_event(0x%06x, %d, 0x%p)\n",
1147 event, priority, skt); 1153 event, priority, skt);
1148 1154