]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: vpd: Fix platform driver and device registration/unregistration
authorGuenter Roeck <linux@roeck-us.net>
Wed, 15 Nov 2017 21:00:45 +0000 (13:00 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2017 15:57:18 +0000 (16:57 +0100)
commitf43829c236faee3a418480ecba587e340501c2d9
tree6018880561ec565324354bf2919a8c9237a5263e
parentbb93ab69f3b022e3bf06f7d3f4e416b20e04e848
firmware: vpd: Fix platform driver and device registration/unregistration

The driver exit function needs to unregister both platform device and
driver. Also, during registration, register driver first and perform
error checks.

Fixes: cd796c7e3fb1 ("firmware: Google VPD sysfs driver")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: stable <stable@vger.kernel.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/google/vpd.c