Skip to content
Commit 4d05447e authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik
Browse files

libata: fix probe_ent alloc/free bugs



ata_probe_ent_alloc() had a temporary hack such that devm_kzalloc()
was used for allocation if devres had been previously initialized on
the device; otherwise, plain kzalloc() was used.  This was to make the
code useable from both the old and devres-aware libata drivers during
transition.  This hack made ata_sas_port_alloc() unable to determine
how the probe_ent is allocated, causing double free in some cases.

Remove the now-unneeded hack and make ata_sas_port_alloc() use
devm_kfree().

Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 8d9db2d2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment