]> git.baikalelectronics.ru Git - kernel.git/commit
sata: ahci-da850: Fix some error handling paths in 'ahci_da850_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 16 Aug 2017 05:31:03 +0000 (07:31 +0200)
committerTejun Heo <tj@kernel.org>
Wed, 16 Aug 2017 14:38:27 +0000 (07:38 -0700)
commit99997848e431c5e6e61f9f242a03bf788cb48c80
tree6990101a2c0585c17e7b2bc76d59973dd99445a6
parentcac3fe148953f7fa90dc14400ae925c611c7412f
sata: ahci-da850: Fix some error handling paths in 'ahci_da850_probe()'

'rc' is known to be 0 at this point.
If 'platform_get_resource()' or 'devm_ioremap()' fail, return -ENOMEM
instead of 0 which means success.

tj: Changed error code from -ENOMEM to -ENODEV for get_resource
    failure as suggested by Sergei.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
drivers/ata/ahci_da850.c