[PATCH] w1: don't leak refcount on slave attach failure in w1_attach_slave_device()

2017-01-21 Thread Maciej S. Szmigiero
Near the beginning of w1_attach_slave_device() we increment a w1 master reference count. Later, when we are going to exit this function without actually attaching a slave device (due to failure of __w1_attach_slave_device()) we need to decrement this reference count back. Signed-off-by: Maciej S.

[PATCH] w1: don't leak refcount on slave attach failure in w1_attach_slave_device()

2017-01-21 Thread Maciej S. Szmigiero
Near the beginning of w1_attach_slave_device() we increment a w1 master reference count. Later, when we are going to exit this function without actually attaching a slave device (due to failure of __w1_attach_slave_device()) we need to decrement this reference count back. Signed-off-by: Maciej S.