In uio_dev_add_attributes() error handing case, idev is used after
device_unregister(), in which 'idev' has been released, touch idev cause
use-after-free.
Fixes: a93e7b3315 ("uio: Prevent device destruction while fds are open")
Signed-off-by: Liu Jian <[email protected]>
Reviewed-by: Hamish Martin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>