Merge tag 'input-for-v6.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor...
[platform/kernel/linux-starfive.git] / drivers / siox / siox-core.c
index 7c4f32d..5614085 100644 (file)
@@ -839,6 +839,8 @@ static struct siox_device *siox_device_add(struct siox_master *smaster,
 
 err_device_register:
        /* don't care to make the buffer smaller again */
+       put_device(&sdevice->dev);
+       sdevice = NULL;
 
 err_buf_alloc:
        siox_master_unlock(smaster);