]> www.infradead.org Git - users/hch/misc.git/commitdiff
usb: phy: twl6030: Fix incorrect type for ret
authorXichao Zhao <zhao.xichao@vivo.com>
Fri, 22 Aug 2025 09:22:24 +0000 (17:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Sep 2025 13:21:45 +0000 (15:21 +0200)
In the twl6030_usb_probe(), the variable ret is declared as
a u32 type. However, since ret may receive -ENODEV when accepting
the return value of omap_usb2_set_comparator().Therefore, its type
should be changed to int.

Fixes: 0e98de67bacba ("usb: otg: make twl6030_usb as a comparator driver to omap_usb2")
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Link: https://lore.kernel.org/r/20250822092224.30645-1-zhao.xichao@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/phy/phy-twl6030-usb.c

index 49d79c1257f3a4004f17322c29eeeb35286685f6..8c09db750bfd6305193dff2f34d48940e31bcf8e 100644 (file)
@@ -328,9 +328,8 @@ static int twl6030_set_vbus(struct phy_companion *comparator, bool enabled)
 
 static int twl6030_usb_probe(struct platform_device *pdev)
 {
-       u32 ret;
        struct twl6030_usb      *twl;
-       int                     status, err;
+       int                     status, err, ret;
        struct device_node      *np = pdev->dev.of_node;
        struct device           *dev = &pdev->dev;