Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit da009f39 authored by Ben Dooks's avatar Ben Dooks Committed by Greg Kroah-Hartman
Browse files

sysdev: detect multiple driver registrations



I've just found how easy it is to accidentally register a sysdev_driver for
two different classes.  When this happens, bad things happen as the
sysdev_driver structure keeps has the list entry for the driver
registration.

The following patch makes a WARN_ON() if this happens, although I think
BUG_ON or returning -EAGAIN could also be valid responses to this.

Signed-off-by: default avatarBen Dooks <ben@fluff.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6c847402
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment