char: lp: remove redundant initialization of err
authorShreenidhi Shedi <sshedi@vmware.com>
Fri, 3 Jun 2022 13:00:40 +0000 (18:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 13:29:50 +0000 (15:29 +0200)
err is getting assigned with an appropriate value before returning,
hence this initialization is unnecessary.

Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
Link: https://lore.kernel.org/r/20220603130040.601673-2-sshedi@vmware.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/lp.c

index 0e22e3b..38aad99 100644 (file)
@@ -1019,7 +1019,7 @@ static struct parport_driver lp_driver = {
 
 static int __init lp_init(void)
 {
-       int i, err = 0;
+       int i, err;
 
        if (parport_nr[0] == LP_PARPORT_OFF)
                return 0;