diff options
| author | Fengguang Wu <fengguang.wu@intel.com> | 2013-12-04 23:36:31 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-04 23:36:31 -0500 |
| commit | 2e30d14f12421f39329faefd5ae92b02cc9ff255 (patch) | |
| tree | 2e487ddb4a20530061504b5b40d45aebb2c26aed | |
| parent | 2fd3f65132958e9ec95563cc981cc1ffca2b81a0 (diff) | |
USB: fix coccinelle warnings
drivers/usb/host/ehci-mv.c:181:26-27: WARNING comparing pointer to 0, suggest !E
/c/kernel-tests/src/cocci/drivers/usb/host/ehci-mv.c:181:26-27: WARNING comparing pointer to 0
Compare pointer-typed values to NULL rather than 0
Semantic patch information:
This makes an effort to choose between !x and x == NULL. !x is used
if it has previously been used with the function used to initialize x.
This relies on type information. More type information can be obtained
using the option -all_includes and the option -I to specify an
include path.
Generated by: coccinelle/null/badzero.cocci
CC: Jingoo Han <jg1.han@samsung.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
| -rw-r--r-- | drivers/usb/host/ehci-mv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c index 417c10da9450..6e8afcaa8ff0 100644 --- a/drivers/usb/host/ehci-mv.c +++ b/drivers/usb/host/ehci-mv.c | |||
| @@ -178,7 +178,7 @@ static int mv_ehci_probe(struct platform_device *pdev) | |||
| 178 | 178 | ||
| 179 | ehci_mv->phy_regs = devm_ioremap(&pdev->dev, r->start, | 179 | ehci_mv->phy_regs = devm_ioremap(&pdev->dev, r->start, |
| 180 | resource_size(r)); | 180 | resource_size(r)); |
| 181 | if (ehci_mv->phy_regs == 0) { | 181 | if (!ehci_mv->phy_regs) { |
| 182 | dev_err(&pdev->dev, "failed to map phy I/O memory\n"); | 182 | dev_err(&pdev->dev, "failed to map phy I/O memory\n"); |
| 183 | retval = -EFAULT; | 183 | retval = -EFAULT; |
| 184 | goto err_put_hcd; | 184 | goto err_put_hcd; |
