pata_parport: fix parport release without claim
PATCH 1/1 pata_parport: fix parport release without claim
When adapter is not found, pi->disconnect() is called without previous pi->connect(). This results in error like this:
parport0: pata_parport tried to release parport when not owner
Add missing out_disconnect label and use it correctly.
--- drivers/ata/pata_parport/pata_parport.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/ata/pata_parport/pata_parport.c +3 -2
@@ -558,12 +558,13 @@ static struct pi_adapter *pi_init_one(struct parport *parport,pi_connect (pi);if (ata_host_activate (host,0 ,NULL ,0 , &pata_parport_sht)) - goto out_unreg_parport; + goto out_disconnect;return pi; -out_unreg_parport: +out_disconnect:pi_disconnect (pi); +out_unreg_parport:parport_unregister_device (pi->pardev);if (pi->proto->release_proto) pi->proto->release_proto (pi);
Signature · 1 line
Ondrej Zary
Quoted 7 lines · Ondrej Zary
When adapter is not found,
pi->disconnect()is called without previouspi->connect(). This results in error like this:
parport0:pata_parporttried to release parport when not ownerAdd missing
out_disconnectlabel and use it correctly.Signed-off-by Ondrej Zary <[email protected]>
[...]
MBR, Sergey
Damien Le Moal
AppliedQuoted 7 lines · Ondrej Zary
When adapter is not found,
pi->disconnect()is called without previouspi->connect(). This results in error like this:
parport0:pata_parporttried to release parport when not ownerAdd missing
out_disconnectlabel and use it correctly.Signed-off-by Ondrej Zary <[email protected]>
Applied to for-6.3-fixes. Thanks !
Signature · 2 lines
Damien Le Moal Western Digital Research