We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3954b5 commit dd80fb2Copy full SHA for dd80fb2
drivers/clk/zynqmp/clkc.c
@@ -710,6 +710,13 @@ static void zynqmp_get_clock_info(void)
710
FIELD_PREP(CLK_ATTR_NODE_INDEX, i);
711
712
zynqmp_pm_clock_get_name(clock[i].clk_id, &name);
713
+
714
+ /*
715
+ * Terminate with NULL character in case name provided by firmware
716
+ * is longer and truncated due to size limit.
717
+ */
718
+ name.name[sizeof(name.name) - 1] = '\0';
719
720
if (!strcmp(name.name, RESERVED_CLK_NAME))
721
continue;
722
strncpy(clock[i].clk_name, name.name, MAX_NAME_LEN);
0 commit comments