Home
last modified time | relevance | path

Searched hist:"8 ad116e649b21a42e3cccfb3c1b8d5ea52ba19e5" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/ata/
H A Dsata_mv.cdiff 8ad116e649b21a42e3cccfb3c1b8d5ea52ba19e5 Sun Feb 16 09:29:53 CST 2014 Ezequiel Garcia <ezequiel.garcia@free-electrons.com> ata: sata_mv: Cleanup only the initialized ports

When an error occurs in the port initialization loop, currently the
driver tries to cleanup all the ports. This results in a NULL pointer
dereference if the ports were only partially initialized.

Fix this by updating only the number of initialized ports (either
with failure or successfully), before jumping to the error path
and looping over that number in the cleanup loop.

Cc: Andrew Lunn <andrew@lunn.ch>
Reported-by: Mikael Pettersson <mikpelinux@gmail.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org