[PATCH] w1: ds2780: fix the error handling in w1_ds2780_add_slave()

2013-04-26 Thread Wei Yongjun
From: Wei Yongjun Use platform_device_put() instead of platform_device_unregister() if platform_device_add() fail, and platform_device_del() should be used in the error handling case after platform_device_add() success. Signed-off-by: Wei Yongjun --- drivers/w1/slaves/w1_ds2780.c | 3 ++- 1

[PATCH] w1: ds2780: fix the error handling in w1_ds2780_add_slave()

2013-04-26 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Use platform_device_put() instead of platform_device_unregister() if platform_device_add() fail, and platform_device_del() should be used in the error handling case after platform_device_add() success. Signed-off-by: Wei Yongjun