aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2014-03-14 13:22:09 -0400
committerTejun Heo <tj@kernel.org>2014-03-14 14:30:28 -0400
commit5434b203156ef245b7847128c446c5b54f12a6d4 (patch)
tree25b5c5da0cb2f3cb126058f027ba69834841af65
parent13e8e78bdd148f615da1e5d1edcf0b58b7c2b684 (diff)
ata: ahci_platform: fix devm_ioremap_resource() return value checking
devm_ioremap_resource() returns a pointer to the remapped memory or an ERR_PTR() encoded error code on failure. Fix the check inside ahci_platform_get_resources() accordingly. Also while at it remove a needless line break. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r--drivers/ata/ahci_platform.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index db24d2a08051..70fbf664a73c 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -199,8 +199,7 @@ static void ahci_platform_put_resources(struct device *dev, void *res)
199 * RETURNS: 199 * RETURNS:
200 * The allocated ahci_host_priv on success, otherwise an ERR_PTR value 200 * The allocated ahci_host_priv on success, otherwise an ERR_PTR value
201 */ 201 */
202struct ahci_host_priv *ahci_platform_get_resources( 202struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev)
203 struct platform_device *pdev)
204{ 203{
205 struct device *dev = &pdev->dev; 204 struct device *dev = &pdev->dev;
206 struct ahci_host_priv *hpriv; 205 struct ahci_host_priv *hpriv;
@@ -219,8 +218,9 @@ struct ahci_host_priv *ahci_platform_get_resources(
219 218
220 hpriv->mmio = devm_ioremap_resource(dev, 219 hpriv->mmio = devm_ioremap_resource(dev,
221 platform_get_resource(pdev, IORESOURCE_MEM, 0)); 220 platform_get_resource(pdev, IORESOURCE_MEM, 0));
222 if (!hpriv->mmio) { 221 if (IS_ERR(hpriv->mmio)) {
223 dev_err(dev, "no mmio space\n"); 222 dev_err(dev, "no mmio space\n");
223 rc = PTR_ERR(hpriv->mmio);
224 goto err_out; 224 goto err_out;
225 } 225 }
226 226