Revert change to common.c and move invalid parameter error messages into xb*.c.

Use !cli_device_is_opened() instead of cli_state->dev == NULL.