The reason why device registration is the last thing done is that if any errors happens at the time you register device, you have to undo the registration activities and as such, it is often done last.
<h3>What is role of a device driver?</h3>
The device driver is known to be the device that gives the other part of the operating system the needed software interface or the device class.
The reason why un-registering a device must happen first in the exit routine of a device driver is because if there is an issue, one has to settle it first before registration as one does not want error.
Conclusively, If any kind of errors is seen when a person wants to register the device, the person must undo any kind of registration that has been performed before that error occurs.
Learn more about device registration from
brainly.com/question/16010611