Re: [media] tuners: One check less in m88rs6000t_get_rf_strength() after error detection
From: Julia Lawall <hidden>
Date: 2015-12-28 10:36:30
Also in:
linux-media, lkml
From: Julia Lawall <hidden>
Date: 2015-12-28 10:36:30
Also in:
linux-media, lkml
On Mon, 28 Dec 2015, SF Markus Elfring wrote:
quoted
quoted
Move the jump label directly before the desired log statement so that the variable "ret" will not be checked once more after it was determined that a function call failed.Why not avoid both unnecessary ifsI would find such a fine-tuning also nice in principle at more source code places.quoted
and the enormous ugliness of a label inside an if by making two returns: a return 0 for success and a dev_dbg and return ret for failure?How should your suggestion finally work when the desired execution success can be determined for such functions only after several other calls succeeded?
Not idea what this means, but immediate return 0 followed by various code for reacting to an error is very common, so it looks like it should be possible here. julia