isdn: mISDN: remove unneeded variable 'ret'
authorYang Li <yang.lee@linux.alibaba.com>
Wed, 10 Mar 2021 08:53:04 +0000 (16:53 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Mar 2021 20:45:15 +0000 (12:45 -0800)
Fix the following coccicheck warning:
./drivers/isdn/mISDN/dsp_core.c:956:6-9: Unneeded variable: "err".
Return "0" on line 1001

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/mISDN/dsp_core.c

index 038e72a84b3344eb0ff1c91936dfcbfb2f259fea..4946ea14bf7449764c85758f9812c2bddb59e6cf 100644 (file)
@@ -953,7 +953,6 @@ dsp_ctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
 {
        struct dsp              *dsp = container_of(ch, struct dsp, ch);
        u_long          flags;
-       int             err = 0;
 
        if (debug & DEBUG_DSP_CTRL)
                printk(KERN_DEBUG "%s:(%x)\n", __func__, cmd);
@@ -998,7 +997,7 @@ dsp_ctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
                module_put(THIS_MODULE);
                break;
        }
-       return err;
+       return 0;
 }
 
 static void