linux-mips
[Top] [All Lists]

[PATCH 5/5] usb: chipidea: Fix incorrect check of function return value

To: Ralf Baechle <ralf@linux-mips.org>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Gabor Juhos <juhosg@openwrt.org>, John Crispin <blogic@openwrt.org>, Alan Stern <stern@rowland.harvard.edu>, "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
Subject: [PATCH 5/5] usb: chipidea: Fix incorrect check of function return value
From: Svetoslav Neykov <svetoslav@neykov.name>
Date: Wed, 13 Feb 2013 23:38:58 +0200
Cc: linux-mips@linux-mips.org, linux-usb@vger.kernel.org, Svetoslav Neykov <svetoslav@neykov.name>
In-reply-to: <1360791538-6332-1-git-send-email-svetoslav@neykov.name>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1360791538-6332-1-git-send-email-svetoslav@neykov.name>
Sender: linux-mips-bounce@linux-mips.org
Use the correct variable to check for the return value of the last function.

Signed-off-by: Svetoslav Neykov <svetoslav@neykov.name>
---
 drivers/usb/chipidea/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 85c72e5..8442305 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -413,7 +413,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
        }
 
        base = devm_request_and_ioremap(dev, res);
-       if (!res) {
+       if (!base) {
                dev_err(dev, "can't request and ioremap resource\n");
                return -ENOMEM;
        }
-- 
1.7.9.5


<Prev in Thread] Current Thread [Next in Thread>