{
u32 i;
u32 idcode, idcode2;
- static char name[ZYNQMP_VERSION_SIZE];
+ char name[ZYNQMP_VERSION_SIZE];
u32 ret_payload[PAYLOAD_ARG_CNT];
xilinx_pm_request(PM_GET_CHIPID, 0, 0, 0, 0, ret_payload);
return "unknown";
/* Add device prefix to the name */
- strncat(name, "zu", 2);
+ strncpy(name, "zu", ZYNQMP_VERSION_SIZE);
strncat(&name[2], simple_itoa(zynqmp_devices[i].device), 2);
if (zynqmp_devices[i].variants & ZYNQMP_VARIANT_EV) {
debug("Variant not identified\n");
}
- return name;
+ return strdup(name);
}
#endif