From: Colin Ian King Date: Fri, 26 Mar 2021 19:13:57 +0000 (+0000) Subject: usb: cdnsp: remove redundant initialization of variable ret X-Git-Tag: accepted/tizen/unified/20230118.172025~7412^2~61^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ecc3eb03c37b54c507ba5127a4c781d36b0c121;p=platform%2Fkernel%2Flinux-rpi.git usb: cdnsp: remove redundant initialization of variable ret The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Pawel Laszczak Signed-off-by: Peter Chen --- diff --git a/drivers/usb/cdns3/cdnsp-mem.c b/drivers/usb/cdns3/cdnsp-mem.c index 1d1b9a4..5d4c4bf 100644 --- a/drivers/usb/cdns3/cdnsp-mem.c +++ b/drivers/usb/cdns3/cdnsp-mem.c @@ -686,7 +686,7 @@ static void cdnsp_free_priv_device(struct cdnsp_device *pdev) static int cdnsp_alloc_priv_device(struct cdnsp_device *pdev) { - int ret = -ENOMEM; + int ret; ret = cdnsp_init_device_ctx(pdev); if (ret)