Re: [PATCH 3/10] scsi: megaraid_sas - Add Poll Wait mechanism to MegaRAID SAS driver (PART-II)

Andrew Morton
2009-05-06T21:22:38Z

On Tue, 5 May 2009 18:41:45 -0600
"Yang, Bo" <Bo.Yang@lsi.com> wrote:

> @@ -3645,6 +3657,12 @@ static int __init megasas_init(void)
> &driver_attr_release_date);
> if (rval)
> goto err_dcf_rel_date;
> +
> + rval = driver_create_file(&megasas_pci_driver.driver,
> + &driver_attr_support_poll_for_event);
> + if (rval)
> + goto err_dcf_support_poll_for_event;

This goto will be taken if the file wasn't successfully added.

> rval = driver_create_file(&megasas_pci_driver.driver,
> &driver_attr_dbg_lvl);
> if (rval)
> @@ -3662,6 +3680,11 @@ err_dcf_poll_mode_io:
> err_dcf_dbg_lvl:
> driver_remove_file(&megasas_pci_driver.driver,
> &driver_attr_release_date);
> +
> +err_dcf_support_poll_for_event:
> + driver_remove_file(&megasas_pci_driver.driver,
> + &driver_attr_support_poll_for_event);

And we then try to remove something which isn't there.