]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: fix error unwind in sysfs hw counters code
authorDoug Ledford <dledford@redhat.com>
Tue, 7 Jun 2016 11:43:46 +0000 (07:43 -0400)
committerDoug Ledford <dledford@redhat.com>
Tue, 7 Jun 2016 13:50:52 +0000 (09:50 -0400)
commitb46be7811736cb85a394377f5b6d9236e9569328
tree3118b46a560246c847c4674a19084bc4f9d01d31
parent2f19a46b78f2e1e84f7d42cd2dc73e3ecba7ce26
IB/core: fix error unwind in sysfs hw counters code

Between the initial and final versions of the function setup_hw_stats,
the order of variable initialization was changed.  However, the unwind
flow on error did not properly keep up with the flow changes.  Make
the unwind flow match a proper unwind of the allocation flow, then
remove no longer needed variable initializations.

Fixes: 6ab34bd4aa97 (IB/core: Make device counter infrastructure
dynamic)
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/sysfs.c