usb: typec: fusb302: reorganizing the probe function a little
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Thu, 20 Sep 2018 11:23:46 +0000 (14:23 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Sep 2018 11:37:29 +0000 (13:37 +0200)
commitc800c51f586b3c3dda59f5f08d3df9bd1ae09e3d
tree1407171a899d8eb8ae28df01f95655afdc28b9cd
parent148b0aa78e4e1077e38f928124bbc9c2d2d24006
usb: typec: fusb302: reorganizing the probe function a little

The debugfs needs to be initialized as the last step in
probe in this case. The struct dentry *rootdir can't be
pointing to anything unless driver probe really finishes
successfully.

It is also not necessary to clear the i2c clientdata if the
probe fails, so removing the extra label used for that.

Acked-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/fusb302/fusb302.c