]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi: aha152x: Fix aha152x_setup() __setup handler return value
authorRandy Dunlap <rdunlap@infradead.org>
Wed, 23 Feb 2022 00:06:23 +0000 (16:06 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 28 Feb 2022 02:39:32 +0000 (21:39 -0500)
__setup() handlers should return 1 if the command line option is handled
and 0 if not (or maybe never return 0; doing so just pollutes init's
environment with strings that are not init arguments/parameters).

Return 1 from aha152x_setup() to indicate that the boot option has been
handled.

Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru
Link: https://lore.kernel.org/r/20220223000623.5920-1-rdunlap@infradead.org
Cc: "Juergen E. Fischer" <fischer@norbit.de>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Reported-by: Igor Zhbanov <i.zhbanov@omprussia.ru>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aha152x.c

index 34b2378075fd9e1388224cd4c7a0155aa7e6a013..5f554a3a0f626f54e9b20d6dd0af7deeb7b97973 100644 (file)
@@ -3429,13 +3429,11 @@ static int __init aha152x_setup(char *str)
        setup[setup_count].synchronous = ints[0] >= 6 ? ints[6] : 1;
        setup[setup_count].delay       = ints[0] >= 7 ? ints[7] : DELAY_DEFAULT;
        setup[setup_count].ext_trans   = ints[0] >= 8 ? ints[8] : 0;
-       if (ints[0] > 8) {                                                /*}*/
+       if (ints[0] > 8)
                printk(KERN_NOTICE "aha152x: usage: aha152x=<IOBASE>[,<IRQ>[,<SCSI ID>"
                       "[,<RECONNECT>[,<PARITY>[,<SYNCHRONOUS>[,<DELAY>[,<EXT_TRANS>]]]]]]]\n");
-       } else {
+       else
                setup_count++;
-               return 0;
-       }
 
        return 1;
 }