usb: musb: remove redundant assignment to variable ret
authorColin Ian King <colin.king@canonical.com>
Mon, 16 Mar 2020 21:11:29 +0000 (16:11 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Mar 2020 19:03:27 +0000 (20:03 +0100)
Variable ret is being initialized with a value that is never read,
it is assigned a new value later on. The assignment is redundant
and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Link: https://lore.kernel.org/r/20200316211136.2274-2-b-liu@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/mediatek.c

index a627f41..6196b0e 100644 (file)
@@ -448,7 +448,7 @@ static int mtk_musb_probe(struct platform_device *pdev)
        struct platform_device_info pinfo;
        struct device *dev = &pdev->dev;
        struct device_node *np = dev->of_node;
-       int ret = -ENOMEM;
+       int ret;
 
        glue = devm_kzalloc(dev, sizeof(*glue), GFP_KERNEL);
        if (!glue)