Add a jump target so that a bit of exception handling can be better reused in an if branch of this function.
Hmm. Doesn't really gain an awful lot this. Would understand if there were multiple return paths, but in that case I'd have implemented something like this anyway. Also your patch description isn't really correct. You're re-using code from the sunny day scenario to handle an exception.
Other people have given him similar feedback on his other patches with this pattern. I'm not intending to apply any of them.
I can offer another bit of information for a software development discussion. ๐ญ
The affected source file can be compiled for the processor architecture โx86_64โ by a tool like โGCC 6.4.1+r251631-1.3โ from the software distribution โopenSUSE Tumbleweedโ with the following command example.
my_cc=/usr/bin/gcc-6 \ && my_module=sound/soc/codecs/da7218.o \ && for XYZ in 0 s 3; do echo " _____ $XYZ _____" \ && my_extra="-O$XYZ" \ && git checkout ':/^ASoC: da7218: Delete two error messages for a failed memory allocation in da7218_of_to_pdata' \ && make -j4 CC="${my_cc}" HOSTCC="${my_cc}" EXTRA_CFLAGS="${my_extra}" allmodconfig "${my_module}" \ && size "${my_module}" \ && git checkout ':/^ASoC: da7218: Use common error handling code in da7218_of_to_pdata' \ && make -j4 CC="${my_cc}" HOSTCC="${my_cc}" EXTRA_CFLAGS="${my_extra}" allmodconfig "${my_module}" \ && size "${my_module}"; done
๐ฎ Do you find the following differences worth for further clarification?
โโโโโโโโโโโคโโโโโโโ โ setting โ text โ โ โโโโโโโโโโชโโโโโโโฃ โ O0 โ -25 โ โ Os โ -14 โ โ O3 โ +11 โ โโโโโโโโโโโงโโโโโโโ
Regards, Markus