diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-01-20 14:01:31 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-01-20 14:01:31 -0300 |
commit | b4b7ff4b08e691656c9d77c758fc355833128ac0 (patch) | |
tree | 82fcb00e6b918026dc9f2d1f05ed8eee83874cc0 /drivers/pcmcia | |
parent | 35acfa0fc609f2a2cd95cef4a6a9c3a5c38f1778 (diff) |
Linux-libre 4.4-gnupck-4.4-gnu
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/ds.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 0decee6c5..489ea1098 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -468,12 +468,10 @@ static int pcmcia_device_query(struct pcmcia_device *p_dev) if ((length < 2) || (length > 255)) continue; - new = kmalloc(sizeof(char) * length, GFP_KERNEL); + new = kstrdup(tmp, GFP_KERNEL); if (!new) continue; - new = strncpy(new, tmp, length); - tmp = p_dev->prod_id[i]; p_dev->prod_id[i] = new; kfree(tmp); |