Valgrind: Harden against missing devices

Task-number: QTCREATORBUG-9456
Change-Id: I13b7c5f675a09a612631b97a0d95685872e22e04
Reviewed-by: hjk <hjk121@nokiamail.com>