diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_aux.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 6e9c7f33e276..7c01c4c3f6b9 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -98,13 +98,11 @@ static void __init zfcp_init_device_setup(char *devstr) | |||
98 | u64 wwpn, lun; | 98 | u64 wwpn, lun; |
99 | 99 | ||
100 | /* duplicate devstr and keep the original for sysfs presentation*/ | 100 | /* duplicate devstr and keep the original for sysfs presentation*/ |
101 | str_saved = kmalloc(strlen(devstr) + 1, GFP_KERNEL); | 101 | str_saved = kstrdup(devstr, GFP_KERNEL); |
102 | str = str_saved; | 102 | str = str_saved; |
103 | if (!str) | 103 | if (!str) |
104 | return; | 104 | return; |
105 | 105 | ||
106 | strcpy(str, devstr); | ||
107 | |||
108 | token = strsep(&str, ","); | 106 | token = strsep(&str, ","); |
109 | if (!token || strlen(token) >= ZFCP_BUS_ID_SIZE) | 107 | if (!token || strlen(token) >= ZFCP_BUS_ID_SIZE) |
110 | goto err_out; | 108 | goto err_out; |