From: Axel Lin Date: Tue, 19 Mar 2019 03:36:07 +0000 (+0800) Subject: regulator: axp20x: Remove unneeded NULL test against rdev X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=969697de7fa6eee12fbe216f9603708932a78c0d;p=linux.git regulator: axp20x: Remove unneeded NULL test against rdev rdev won't be NULL in .enable callback. Signed-off-by: Axel Lin Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c index fba8f58ab7696..8a366f66208ea 100644 --- a/drivers/regulator/axp20x-regulator.c +++ b/drivers/regulator/axp20x-regulator.c @@ -437,9 +437,6 @@ static int axp20x_regulator_enable_regmap(struct regulator_dev *rdev) struct axp20x_dev *axp20x = rdev_get_drvdata(rdev); const struct regulator_desc *desc; - if (!rdev) - return -EINVAL; - desc = rdev->desc; switch (axp20x->variant) {