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>