usb: xhci: exynos: variable node should be signed
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Tue, 30 Sep 2025 10:34:44 +0000 (11:34 +0100)
committerMarek Vasut <marek.vasut+usb@mailbox.org>
Tue, 28 Oct 2025 15:33:15 +0000 (16:33 +0100)
The variable node is assigned to the return value of a function that
returns an int. It is tested for being negative and then passed as an
argument to a function that takes an int. So 'node' should not be
declared as unsigned. Correct it.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
drivers/usb/host/xhci-exynos5.c

index 6a2d422..c509ce1 100644 (file)
@@ -56,8 +56,7 @@ static int xhci_usb_of_to_plat(struct udevice *dev)
 {
        struct exynos_xhci_plat *plat = dev_get_plat(dev);
        const void *blob = gd->fdt_blob;
-       unsigned int node;
-       int depth;
+       int node, depth;
 
        /*
         * Get the base address for XHCI controller from the device node