]> git.baikalelectronics.ru Git - kernel.git/commit
Driver core: fix driver_register() return value
authorStas Sergeev <stsp@aknet.ru>
Sat, 17 Oct 2009 20:31:38 +0000 (00:31 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 30 Oct 2009 21:59:51 +0000 (14:59 -0700)
commit058410b6c1894650ea4bb583cc90666623c36541
tree51249000a01a41a4036c8be1313186b0c4116206
parente5a4d6cf165f342eecfec3658b62c47018c4711f
Driver core: fix driver_register() return value

In this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=bbe88c018a9fdf7b62b1730ea1aab956c9badae1
the check was added for another driver to already claim the same device
on the same bus. But the returned error code was wrong: to modprobe, the
-EEXIST means that _this_ driver is already installed. It therefore
doesn't produce the needed error message when _another_ driver is trying
to register for the same device.  Returning -EBUSY fixes the problem.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/driver.c