]> git.baikalelectronics.ru Git - kernel.git/commit
tc1100-wmi - add error handling for device registration
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 4 Dec 2009 08:36:15 +0000 (00:36 -0800)
committerLen Brown <len.brown@intel.com>
Wed, 16 Dec 2009 17:53:11 +0000 (12:53 -0500)
commitb11892fdef241c5716a6b2c47f858cda51e565e4
treef5a727d12849a835546f5c5dc7fcb6b82182daae
parent3f376d54c1929bf5031c861996ffcb61b7813b0f
tc1100-wmi - add error handling for device registration

Any of the platform API functions can fail; driver should be prepared
to handle such failures. Also:

 - changed to platform_driver_probe() since the device is created
   right there with the driver;
 - added __devexit annotation to remove method;
 - fixed memory leak on module unload - named platform_device_del() is not
   enough to free platform device, need platform_device_unregister().

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/platform/x86/tc1100-wmi.c