@@ -213,21 +213,19 @@ static struct eisa_driver sim710_eisa_driver = {
static int __init sim710_init(void)
{
- int err = -ENODEV;
-
#ifdef MODULE
if (sim710)
param_setup(sim710);
#endif
#ifdef CONFIG_EISA
- err = eisa_driver_register(&sim710_eisa_driver);
+ /*
+ * FIXME: We'd really like to return -ENODEV if no devices have actually
+ * been found. However eisa_driver_register() only reports problems
+ * with kobject_register() so simply return success for now.
+ */
+ eisa_driver_register(&sim710_eisa_driver);
#endif
- /* FIXME: what we'd really like to return here is -ENODEV if
- * no devices have actually been found. Instead, the err
- * above actually only reports problems with kobject_register,
- * so for the moment return success */
-
return 0;
}
Take the opportunity to rework the comment a little. Fixes the following W=1 kernel build warning(s): drivers/scsi/sim710.c: In function ‘sim710_init’: drivers/scsi/sim710.c:216:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] Cc: "James E.J. Bottomley" <jejb@linux.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Richard Hirst <richard@sleepie.demon.co.uk> Cc: c by <James.Bottomley@SteelEye.com> Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/scsi/sim710.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) -- 2.27.0