hwmon: (occ) Print response status in first poll error message

In order to better debug problems starting up the driver, print
the response status from the OCC in the error logged when the first
poll command fails.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210209171235.20624-5-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
This commit is contained in:
Eddie James 2021-02-09 11:12:35 -06:00 committed by Joel Stanley
parent 75028ef458
commit 38483e8fed

View File

@ -1162,8 +1162,9 @@ int occ_setup(struct occ *occ, const char *name)
dev_info(occ->bus_dev, "host is not ready\n");
return rc;
} else if (rc < 0) {
dev_err(occ->bus_dev, "failed to get OCC poll response: %d\n",
rc);
dev_err(occ->bus_dev,
"failed to get OCC poll response=%02x: %d\n",
occ->resp.return_status, rc);
return rc;
}