瀏覽代碼

mach-snapdragon: Fix overwriting last digit of serial number

When generating the MAC address based on the boards serial number
the last digit was overwritten with the null termination. That way
boards with serial numbers close to each other would use the same
MAC address.

Signed-off-by: Jan-Christoph Tebbe <Jan-Christoph.Tebbe@ithinx.io>
Jan-Christoph Tebbe 4 年之前
父節點
當前提交
740370282e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/arm/mach-snapdragon/misc.c

+ 1 - 1
arch/arm/mach-snapdragon/misc.c

@@ -41,7 +41,7 @@ void msm_generate_mac_addr(u8 *mac)
 	int i;
 	char sn[9];
 
-	snprintf(sn, 8, "%08x", msm_board_serial());
+	snprintf(sn, 9, "%08x", msm_board_serial());
 
 	/* fill in the mac with serialno, use locally adminstrated pool */
 	mac[0] = 0x02;