You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
parport: fix error handling
After registering the device if exclusive access fails for any reason then we need to unregister the device to remove all references. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
52721d9d33
commit
cabea69587
@@ -907,7 +907,8 @@ parport_register_dev_model(struct parport *port, const char *name,
|
||||
spin_unlock(&port->physport->pardevice_lock);
|
||||
pr_debug("%s: cannot grant exclusive access for device %s\n",
|
||||
port->name, name);
|
||||
goto err_put_dev;
|
||||
device_unregister(&par_dev->dev);
|
||||
goto err_put_port;
|
||||
}
|
||||
port->flags |= PARPORT_FLAG_EXCL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user