am 6a62cac4: Merge "Further cleanup of the logic in device_init."

* commit '6a62cac4c1d2f10aa0a535df8e9757ee2f0fe725':
  Further cleanup of the logic in device_init.