Re: [PATCH]optimize error handling in tick_check_new_device

From: Thomas Gleixner
Date: Thu Jul 28 2016 - 10:53:16 EST

On Wed, 27 Jul 2016, Gaurav Jindal (Gaurav Jindal) wrote:
> In the function tick_check_new_device, module error is handled after checking
> if the newdev should go as broadcast-installation device in the functions
> tick_check_percpu and tick_check_preferred. In case the try_module_get returns
> false, the above 2 calls are extra thus wasting CPU cycles.

This is hardly a fast path so the extra cycles do not matter at all. As a
result of your change you leak a module reference when the 'goto out_bc' is
taken. So I prefer the existing correct version over a pretty uninteresting