From 736a23ccae3d9a7a652226dbf7afacb32ab5cd5c Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 12 Mar 2024 11:35:48 +0100 Subject: [PATCH] probe: Fix crash on systems without USB While __get_phandle_array returns the empty set when the property is not available, str_array would return None, unless instructed otherwise. Make sure that it also returns the empty set. --- board/netconf/rootfs/libexec/infix/probe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/netconf/rootfs/libexec/infix/probe b/board/netconf/rootfs/libexec/infix/probe index 949a3a3a..9cb3c50d 100755 --- a/board/netconf/rootfs/libexec/infix/probe +++ b/board/netconf/rootfs/libexec/infix/probe @@ -83,7 +83,7 @@ class DTSystem: } def infix_usb_devices(self, out): - names=self.infix.str_array("usb-port-names") + names=self.infix.str_array("usb-port-names", ()) phs=self.__get_phandle_array("usb-ports") data=dict(zip(names,phs)) if data != {}: