]> git.sur5r.net Git - u-boot/commitdiff
dm: cpu: Test against cpu_ops->get_info in cpu_get_info()
authorBin Meng <bmeng.cn@gmail.com>
Fri, 12 Jun 2015 06:52:19 +0000 (14:52 +0800)
committerSimon Glass <sjg@chromium.org>
Wed, 15 Jul 2015 00:03:15 +0000 (18:03 -0600)
In cpu_get_info() it wrongly tests against cpu_ops->get_desc to see
if it is NULL. It should test against cpu_ops->get_info.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
drivers/cpu/cpu-uclass.c

index aa0267ca03e9c7cf3c37fac47c822e084ba23ec4..d6be9d4dcf5cd534a9efb5627a91dfe405887065 100644 (file)
@@ -26,7 +26,7 @@ int cpu_get_info(struct udevice *dev, struct cpu_info *info)
 {
        struct cpu_ops *ops = cpu_get_ops(dev);
 
-       if (!ops->get_desc)
+       if (!ops->get_info)
                return -ENOSYS;
 
        return ops->get_info(dev, info);