Added the missing return

When working with many devices will some time produce a null "dev" object.