My Non-PnP WDF driver tries creating a device object. As part of testing, we added failure paths where the device creation fails, which means the driverentry fails. However, the driver is still loaded, till I do an sc stop
I even see the unload routine being called by WDF, do I need to perform some sort of Uninit to delete the framework objects?
Yes, that’s the way it works. Non-PnP drivers are never automatically unloaded, and it’s not an error for a service driver not to create a device object.