From: Alison Schofield Date: Wed, 10 Feb 2016 18:34:00 +0000 (-0800) Subject: staging: gdm72xx: compress return logic into one line X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=474be12de61c60503ee6164b65afd5608e60b80c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: gdm72xx: compress return logic into one line Simplify function returns by merging assignment and return into one command line. Found with Coccinelle @@ expression e, ret; @@ -ret = +return e; -return ret; Signed-off-by: Alison Schofield Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/gdm72xx/netlink_k.c b/drivers/staging/gdm72xx/netlink_k.c index b7e5e706d37a..cf0b47cb1ceb 100644 --- a/drivers/staging/gdm72xx/netlink_k.c +++ b/drivers/staging/gdm72xx/netlink_k.c @@ -151,6 +151,5 @@ int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len) pr_err("netlink_broadcast g=%d, t=%d, l=%d, r=%d\n", group, type, len, ret); } - ret = 0; - return ret; + return 0; } diff --git a/drivers/staging/gdm72xx/usb_boot.c b/drivers/staging/gdm72xx/usb_boot.c index 39ca34031a6b..30829875da2e 100644 --- a/drivers/staging/gdm72xx/usb_boot.c +++ b/drivers/staging/gdm72xx/usb_boot.c @@ -357,7 +357,5 @@ int usb_emergency(struct usb_device *usbdev) return ret; dev_info(&usbdev->dev, "GCT Emergency: Filesystem download success.\n"); - ret = em_fw_reset(usbdev); - - return ret; + return em_fw_reset(usbdev); }