@@ -1040,12 +1040,15 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
pdata->read_dma_priv);
if (!host->read_dma_chan) {
dev_err(&pdev->dev, "Unable to get read dma channel\n");
+ ret = -EBUSY;
goto err_req_read_chnl;
}
host->write_dma_chan = dma_request_channel(mask, filter,
pdata->write_dma_priv);
if (!host->write_dma_chan) {
dev_err(&pdev->dev, "Unable to get write dma channel\n");
+
+ ret = -EBUSY;
goto err_req_write_chnl;
}
nand->read_buf = fsmc_read_buf_dma;
@@ -291,6 +291,7 @@ static int __init mtd_oobtest_init(void)
if (!mtd_type_is_nand(mtd)) {
pr_info("this test requires NAND flash\n");
+ err = -ENODEV;
goto out;
}
@@ -355,6 +355,7 @@ static int __init mtd_pagetest_init(void)
if (!mtd_type_is_nand(mtd)) {
pr_info("this test requires NAND flash\n");
+ err = -ENODEV;
goto out;
}
@@ -301,6 +301,7 @@ static int __init mtd_subpagetest_init(void)
if (!mtd_type_is_nand(mtd)) {
pr_info("this test requires NAND flash\n");
+ err = -ENODEV;
goto out;
}