1:The control flow was simplified by using else if statements instead of goto structure.

2:Error conditions are handled more clearly.

3:The device_unlock call at the end of the function is guaranteed in all cases.

Github request : https://github.com/torvalds/linux/pull/967