Re: [PATCH 2/3] thermal: core: Reorder 'thermal_zone_device_register()' error handling code

2017-08-08 Thread Zhang Rui
On Tue, 2017-08-08 at 14:31 +0200, Christophe JAILLET wrote: > Le 08/08/2017 à 10:49, Zhang Rui a écrit : > > > > On Sun, 2017-07-16 at 08:59 +0200, Christophe JAILLET wrote: > > > > > > Reorder code in the error handling path in order to match the way > > > resources > > > have been allocated.

Re: [PATCH 2/3] thermal: core: Reorder 'thermal_zone_device_register()' error handling code

2017-08-08 Thread Zhang Rui
On Tue, 2017-08-08 at 14:31 +0200, Christophe JAILLET wrote: > Le 08/08/2017 à 10:49, Zhang Rui a écrit : > > > > On Sun, 2017-07-16 at 08:59 +0200, Christophe JAILLET wrote: > > > > > > Reorder code in the error handling path in order to match the way > > > resources > > > have been allocated.

Re: [PATCH 2/3] thermal: core: Reorder 'thermal_zone_device_register()' error handling code

2017-08-08 Thread Christophe JAILLET
Le 08/08/2017 à 10:49, Zhang Rui a écrit : On Sun, 2017-07-16 at 08:59 +0200, Christophe JAILLET wrote: Reorder code in the error handling path in order to match the way resources have been allocated. With this new order, we can avoid a call to 'device_unregister()' if

Re: [PATCH 2/3] thermal: core: Reorder 'thermal_zone_device_register()' error handling code

2017-08-08 Thread Christophe JAILLET
Le 08/08/2017 à 10:49, Zhang Rui a écrit : On Sun, 2017-07-16 at 08:59 +0200, Christophe JAILLET wrote: Reorder code in the error handling path in order to match the way resources have been allocated. With this new order, we can avoid a call to 'device_unregister()' if

Re: [PATCH 2/3] thermal: core: Reorder 'thermal_zone_device_register()' error handling code

2017-08-08 Thread Zhang Rui
On Sun, 2017-07-16 at 08:59 +0200, Christophe JAILLET wrote: > Reorder code in the error handling path in order to match the way > resources > have been allocated. > > With this new order, we can avoid a call to 'device_unregister()' if > 'thermal_zone_create_device_groups'()' fails. At this

Re: [PATCH 2/3] thermal: core: Reorder 'thermal_zone_device_register()' error handling code

2017-08-08 Thread Zhang Rui
On Sun, 2017-07-16 at 08:59 +0200, Christophe JAILLET wrote: > Reorder code in the error handling path in order to match the way > resources > have been allocated. > > With this new order, we can avoid a call to 'device_unregister()' if > 'thermal_zone_create_device_groups'()' fails. At this

[PATCH 2/3] thermal: core: Reorder 'thermal_zone_device_register()' error handling code

2017-07-16 Thread Christophe JAILLET
Reorder code in the error handling path in order to match the way resources have been allocated. With this new order, we can avoid a call to 'device_unregister()' if 'thermal_zone_create_device_groups'()' fails. At this point, 'device_register()' has not been called yet. Signed-off-by:

[PATCH 2/3] thermal: core: Reorder 'thermal_zone_device_register()' error handling code

2017-07-16 Thread Christophe JAILLET
Reorder code in the error handling path in order to match the way resources have been allocated. With this new order, we can avoid a call to 'device_unregister()' if 'thermal_zone_create_device_groups'()' fails. At this point, 'device_register()' has not been called yet. Signed-off-by: