acpi/pmstat: fix check for empty name strings.
authorTim Deegan <tim@xen.org>
Thu, 12 Sep 2013 12:09:35 +0000 (13:09 +0100)
committerTim Deegan <tim@xen.org>
Thu, 12 Sep 2013 16:48:01 +0000 (17:48 +0100)
commitcadbe2f9e768585fad52156be2433d49ec9feaf1
tree69c75ce65cf501133e5b251f1e9fdd3fd648c2bf
parente58015acaf53b179847db94524fb2a9f4399b5e6
acpi/pmstat: fix check for empty name strings.

These 'name' strings are actually arrays in their structs.  So the
address is never NULL: instead, we should check the first character to
detect cases where the field wasn't initialized.

Coverity CID 1055633

Signed-off-by: Tim Deegan <tim@xen.org>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/acpi/pmstat.c