aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/debug.h
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-06-25 14:27:36 +0100
committerStephen Boyd <sboyd@kernel.org>2020-07-22 18:46:24 -0700
commit8200597fb16651e5b2280b694dd86352b738657b (patch)
tree111ee12ee0a1f660e805b1283c3bba2a4c527d2a /drivers/usb/cdns3/debug.h
parent260249f929e81d3d5764117fdd6b9e43eb8fb1d5 (diff)
clk: vc5: fix use of memory after it has been kfree'd
There are a several places where printing an error message of init.name occurs after init.name has been kfree'd. Also the failure message is duplicated each time in the code. Fix this by adding a registration error failure path for these cases, moving the duplicated error messages to one common point and kfree'ing init.name only after it has been used. Changes also shrink the object code size by 171 bytes (x86-64, gcc 9.3): Before: text data bss dec hex filename 21057 3960 64 25081 61f9 drivers/clk/clk-versaclock5.o After: text data bss dec hex filename 20886 3960 64 24910 614e drivers/clk/clk-versaclock5.o Addresses-Coverity: ("Use after free") Fixes: f491276a5168 ("clk: vc5: Allow Versaclock driver to support multiple instances") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200625132736.88832-1-colin.king@canonical.com Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net> [sboyd@kernel.org: Drop stray newline] Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/usb/cdns3/debug.h')
0 files changed, 0 insertions, 0 deletions