ControllerHandler: Correct the checking of a device's capabilities

The device type mask was compared to a value instead of a mask, it is
now corrected.