Return -EBUSY if controller is found busy rather than -ENOMEM
and update the error message accordingly.
Fixes: 982388eaa991 ("nvme: Add NVM Express driver support")
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Moritz Fischer <moritzf@google.com>
ndev->udev = udev;
INIT_LIST_HEAD(&ndev->namespaces);
if (readl(&ndev->bar->csts) == -1) {
- ret = -ENODEV;
- printf("Error: %s: Out of memory!\n", udev->name);
+ ret = -EBUSY;
+ printf("Error: %s: Controller not ready!\n", udev->name);
goto free_nvme;
}