On Tue, Jul 3, 2012 at 1:08 AM, Sebastian Ott <seb...@linux.vnet.ibm.com> wrote:

> --- a/drivers/base/driver.c
> +++ b/drivers/base/driver.c
> @@ -187,6 +187,9 @@ int driver_register(struct device_driver
>         ret = driver_add_groups(drv, drv->groups);
>         if (ret)
>                 bus_remove_driver(drv);
> +
> +       kobject_uevent(&drv->p->kobj, KOBJ_ADD);

You should just send the uevent if 'ret' equals to zero., otherwise
OOPS may be triggered by kobject_uevent() after the 'drv' has been
removed.


Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to