[PATCH 6/7] featctrl: drop useless NULL check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 drivers/base/featctrl.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/base/featctrl.c b/drivers/base/featctrl.c
index f40b1f04bc1f..0b81f801058d 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);
-- 
2.38.4





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux