]> git.baikalelectronics.ru Git - kernel.git/commit
firewire: ohci: Misleading kfree in ohci.c::pci_probe/remove
authorOleg Drokin <green@linuxhacker.ru>
Fri, 11 Mar 2011 01:17:27 +0000 (04:17 +0300)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 14 Mar 2011 22:30:57 +0000 (23:30 +0100)
commite8a885ef6cf8791cc4c0e79f70bec5c76d145240
treeb51cb6854bac7282c925f67b612ee22e946445c2
parenta92fae44e93642c2ca5b7a05908637cc49547091
firewire: ohci: Misleading kfree in ohci.c::pci_probe/remove

It seems drivers/firewire/ohci.c is making some optimistic assumptions
about struct fw_ohci and that member "card" will always remain the first
member of the struct.
Plus it's probably going to confuse a lot of static code analyzers too.

So I wonder if there is a good reason not to free the ohci struct just
like it was allocated instead of the tricky &ohci->card way?

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
It is perhaps just a rudiment from before mainline submission of the
driver.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/ohci.c