summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorZheyu Ma <zheyuma97@gmail.com>2021-06-22 07:11:31 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-12 13:21:03 +0200
commit790cb68d35a61569be17f0d2b604cf20fda6a1b2 (patch)
treecb4114ad56b5c63c8f9ca7923081e9675c91b05a /drivers/pcmcia
parent42ac2c63486f5f6760ff014e9243c92b80409d89 (diff)
downloadlinux-stable-790cb68d35a61569be17f0d2b604cf20fda6a1b2.tar.gz
linux-stable-790cb68d35a61569be17f0d2b604cf20fda6a1b2.tar.bz2
linux-stable-790cb68d35a61569be17f0d2b604cf20fda6a1b2.zip
pcmcia: i82092: fix a null pointer dereference bug
commit e39cdacf2f664b09029e7c1eb354c91a20c367af upstream. During the driver loading process, the 'dev' field was not assigned, but the 'dev' field was referenced in the subsequent 'i82092aa_set_mem_map' function. Signed-off-by: Zheyu Ma <zheyuma97@gmail.com> CC: <stable@vger.kernel.org> [linux@dominikbrodowski.net: shorten commit message, add Cc to stable] Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/i82092.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c
index 245d60189375..7a43d4ca7929 100644
--- a/drivers/pcmcia/i82092.c
+++ b/drivers/pcmcia/i82092.c
@@ -106,6 +106,7 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *i
for (i = 0;i<socket_count;i++) {
sockets[i].card_state = 1; /* 1 = present but empty */
sockets[i].io_base = pci_resource_start(dev, 0);
+ sockets[i].dev = dev;
sockets[i].socket.features |= SS_CAP_PCCARD;
sockets[i].socket.map_size = 0x1000;
sockets[i].socket.irq_mask = 0;