Revert "pps: add an error check in parport_attach"

This reverts commit 5eb4888fd3.
This commit is contained in:
Ksawlii 2024-11-24 00:23:14 +01:00
parent b58ae366d7
commit 498b1b9333

View file

@ -145,9 +145,6 @@ static void parport_attach(struct parport *port)
}
index = ida_alloc(&pps_client_index, GFP_KERNEL);
if (index < 0)
goto err_free_device;
memset(&pps_client_cb, 0, sizeof(pps_client_cb));
pps_client_cb.private = device;
pps_client_cb.irq_func = parport_irq;
@ -158,7 +155,7 @@ static void parport_attach(struct parport *port)
index);
if (!device->pardev) {
pr_err("couldn't register with %s\n", port->name);
goto err_free_ida;
goto err_free;
}
if (parport_claim_or_block(device->pardev) < 0) {
@ -186,9 +183,8 @@ err_release_dev:
parport_release(device->pardev);
err_unregister_dev:
parport_unregister_device(device->pardev);
err_free_ida:
err_free:
ida_free(&pps_client_index, index);
err_free_device:
kfree(device);
}