nvme: Fix error code and log to indicate busy
Return -EBUSY if controller is found busy rather than -ENOMEM
and update the error message accordingly.
Fixes: 982388eaa9
("nvme: Add NVM Express driver support")
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Moritz Fischer <moritzf@google.com>
This commit is contained in:
parent
0408347034
commit
5775b0f787
|
@ -835,8 +835,8 @@ int nvme_init(struct udevice *udev)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user