Bluetooth: hidp device creation error handled
authorRaffaele Aquilone <raffaelex.aquilone@intel.com>
Fri, 15 Jun 2012 10:08:25 +0000 (12:08 +0200)
committerbuildbot <buildbot@intel.com>
Fri, 22 Jun 2012 11:12:48 +0000 (04:12 -0700)
commit10020d08b2d5d9e010eaf77d165c30a3b35a0302
treed99459e2415886d267830511489a72f8c5414d8e
parent8c4a53b432e775711a589765cf4daed5e8486ade
Bluetooth: hidp device creation error handled

BZ: 27942

The problems consists in sysfs_create_dir() missing a safety check on the
parent_sd value that sometimes is null. This, in turn, should never happen and
it depends on some structural problems in the HIDP core: this patch is not going
to fix all of them. What it does is just moving the device creation before
the session creation and handling the hid_add_device() failure accordingly.

Change-Id: I2ba7b11b8ded3e323d15180926ccb099deb26212
Signed-off-by: Raffaele Aquilone <raffaelex.aquilone@intel.com>
Reviewed-on: http://android.intel.com:8080/52900
Reviewed-by: Bransiec, ChristopheX <christophex.bransiec@intel.com>
Reviewed-by: Gros, JulienX <julienx.gros@intel.com>
Reviewed-by: Beldie, OvidiuX <ovidiux.beldie@intel.com>
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Champciaux, Nicolas <nicolas.champciaux@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
fs/sysfs/dir.c
net/bluetooth/hidp/core.c