]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
greybus: module: don't create duplicate module ids
authorGreg Kroah-Hartman <greg@kroah.com>
Fri, 24 Oct 2014 10:46:15 +0000 (18:46 +0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 24 Oct 2014 11:00:21 +0000 (19:00 +0800)
commit066799c18ff476642858fb0e4050c5c600c47e4c
treeaedbb8adc98c91a22b88fbeff79220b25e69a677
parent3e6d5f3a6103b20c70f4d75b90d2c798045cc7ef
greybus: module: don't create duplicate module ids

If we somehow get a hotplug event for a module id that we already have
created[1], don't try to create it again, or sysfs will complain loudly.
Instead, abort the creation properly.

[1] If, for example, you happened to run a script on a greybus emulator
twice in a row...

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Reviewed-by: Alex Elder <elder@linaro.org>
drivers/staging/greybus/module.c