diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-05-24 08:14:29 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2018-05-25 08:42:10 +0300 |
commit | 0a356defbd8a448e63a4f6d2d1903938c569b1c0 (patch) | |
tree | cd9cb727d9297f309114c42652f03287a89dce80 | |
parent | 9cb76892c090501a871fe8f477ffc971f03874ff (diff) | |
download | linux-0a356defbd8a448e63a4f6d2d1903938c569b1c0.tar.xz |
hwmon/occ: Silence probe error message when host is shutdown
OpenBMC-Staging-Count: 1
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
-rw-r--r-- | drivers/hwmon/occ/p9_sbe.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/hwmon/occ/p9_sbe.c b/drivers/hwmon/occ/p9_sbe.c index 27886897a3d6..9a1d3ae56d69 100644 --- a/drivers/hwmon/occ/p9_sbe.c +++ b/drivers/hwmon/occ/p9_sbe.c @@ -110,6 +110,7 @@ err: static int p9_sbe_occ_probe(struct platform_device *pdev) { struct occ *occ; + int rc; struct p9_sbe_occ *ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); @@ -126,7 +127,12 @@ static int p9_sbe_occ_probe(struct platform_device *pdev) occ->poll_cmd_data = 0x20; /* P9 OCC poll data */ occ->send_cmd = p9_sbe_occ_send_cmd; - return occ_setup(occ, "p9_occ"); + rc = occ_setup(occ, "p9_occ"); + + /* Host is shutdown, don't spew errors */ + if (rc == -ESHUTDOWN) + rc = -ENODEV; + return rc; } static int p9_sbe_occ_remove(struct platform_device *pdev) |