From: Masahiro Yamada Date: Sun, 28 Sep 2014 13:52:25 +0000 (+0900) Subject: dm: do not check the existence of uclass operation X-Git-Tag: v2015.01-rc1~208^2~63 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=29a1bedbf33d788646b51391bb116e481b9f0b45;p=oweals%2Fu-boot.git dm: do not check the existence of uclass operation The function uclass_add() checks uc_drv->ops as follows: if (uc_drv->ops) { dm_warn("No ops for uclass id %d\n", id); return -EINVAL; } It seems odd because it warns "No ops" when uc_drv->ops has non-NULL pointer. (Looks opposite.) Anyway, most of UCLASS_DRIVER entries have no .ops member. This check makes no sense. Signed-off-by: Masahiro Yamada Acked-by: Simon Glass --- diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index 61ca17e564..901b06ed2b 100644 --- a/drivers/core/uclass.c +++ b/drivers/core/uclass.c @@ -60,10 +60,6 @@ static int uclass_add(enum uclass_id id, struct uclass **ucp) id); return -ENOENT; } - if (uc_drv->ops) { - dm_warn("No ops for uclass id %d\n", id); - return -EINVAL; - } uc = calloc(1, sizeof(*uc)); if (!uc) return -ENOMEM;