[PATCH 6.2 0495/1001] driver core: fix potential null-ptr-deref in device_add()