summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2023-04-24 14:18:04 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2023-05-02 11:33:58 +0200
commitddd65721ff2ba691facdbd651b341a97edb3bc71 (patch)
treea1f0336fa49bdf9c5f58fc83f5bba0f599068e26 /drivers
parentcae79430c32a403cafb1536efc67ddf5fbd160a1 (diff)
downloadbarebox-ddd65721ff2ba691facdbd651b341a97edb3bc71.tar.gz
barebox-ddd65721ff2ba691facdbd651b341a97edb3bc71.tar.xz
featctrl: drop useless NULL check
The only instance of calling featctrl_get_from_provider looks like this: featctrl = featctrl_get_from_provider(&featctrl_args, &gateid); Given that the function is static, there's no need to protect against either argument being NULL, so drop the check. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.barebox.org/20230424121805.150434-6-ahmad@a3f.at Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/featctrl.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/base/featctrl.c b/drivers/base/featctrl.c
index f40b1f04bc..0b81f80105 100644
--- a/drivers/base/featctrl.c
+++ b/drivers/base/featctrl.c
@@ -46,9 +46,6 @@ static struct feature_controller *featctrl_get_from_provider(struct of_phandle_a
struct feature_controller *featctrl;
int ret;
- if (!spec)
- return ERR_PTR(-EINVAL);
-
ret = of_device_ensure_probed(spec->np);
if (ret < 0)
return ERR_PTR(ret);