diff options
Diffstat (limited to 'drivers/leds/leds-sc27xx-bltc.c')
-rw-r--r-- | drivers/leds/leds-sc27xx-bltc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/leds-sc27xx-bltc.c b/drivers/leds/leds-sc27xx-bltc.c index 54a90c8781b6..9d9b7aab843f 100644 --- a/drivers/leds/leds-sc27xx-bltc.c +++ b/drivers/leds/leds-sc27xx-bltc.c @@ -176,8 +176,8 @@ static int sc27xx_led_probe(struct platform_device *pdev) mutex_init(&priv->lock); priv->base = base; priv->regmap = dev_get_regmap(dev->parent, NULL); - if (IS_ERR(priv->regmap)) { - err = PTR_ERR(priv->regmap); + if (!priv->regmap) { + err = -ENODEV; dev_err(dev, "failed to get regmap: %d\n", err); return err; } |