浏览代码

sata_fsl: Return non-zero on error in probe()

while I was looking over kernel sources I've found this small bug.

Formerly, zero was returned even if an error happened.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Michal Sojka 16 年之前
父节点
当前提交
e4ac522bd7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/ata/sata_fsl.c

+ 1 - 1
drivers/ata/sata_fsl.c

@@ -1288,7 +1288,7 @@ static const struct ata_port_info sata_fsl_port_info[] = {
 static int sata_fsl_probe(struct of_device *ofdev,
 static int sata_fsl_probe(struct of_device *ofdev,
 			const struct of_device_id *match)
 			const struct of_device_id *match)
 {
 {
-	int retval = 0;
+	int retval = -ENXIO;
 	void __iomem *hcr_base = NULL;
 	void __iomem *hcr_base = NULL;
 	void __iomem *ssr_base = NULL;
 	void __iomem *ssr_base = NULL;
 	void __iomem *csr_base = NULL;
 	void __iomem *csr_base = NULL;