diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2015-09-22 16:24:37 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-10-01 20:40:22 +0300 |
commit | 1b7015083486e0e5b919981c980980afca37507e (patch) | |
tree | c1832fec96202f8fc6871d7705ed1c0236579855 /drivers/usb/gadget/udc/amd5536udc.c | |
parent | 5d31a17b389870a8eb215ce7313144eb49c08838 (diff) | |
download | linux-1b7015083486e0e5b919981c980980afca37507e.tar.xz |
usb: gadget: amd5536udc: NULL comparison
A NULL comparison can be written as if (var) or if (!var).
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/udc/amd5536udc.c')
-rw-r--r-- | drivers/usb/gadget/udc/amd5536udc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/gadget/udc/amd5536udc.c b/drivers/usb/gadget/udc/amd5536udc.c index 157bff1ffa64..cd8764150861 100644 --- a/drivers/usb/gadget/udc/amd5536udc.c +++ b/drivers/usb/gadget/udc/amd5536udc.c @@ -2185,7 +2185,7 @@ static irqreturn_t udc_data_out_isr(struct udc *dev, int ep_ix) } /* DMA */ - } else if (!ep->cancel_transfer && req != NULL) { + } else if (!ep->cancel_transfer && req) { ret_val = IRQ_HANDLED; /* check for DMA done */ @@ -3189,7 +3189,7 @@ static int init_dma_pools(struct udc *dev) /* setup */ td_stp = dma_pool_alloc(dev->stp_requests, GFP_KERNEL, &dev->ep[UDC_EP0OUT_IX].td_stp_dma); - if (td_stp == NULL) { + if (!td_stp) { retval = -ENOMEM; goto err_alloc_dma; } @@ -3198,7 +3198,7 @@ static int init_dma_pools(struct udc *dev) /* data: 0 packets !? */ td_data = dma_pool_alloc(dev->stp_requests, GFP_KERNEL, &dev->ep[UDC_EP0OUT_IX].td_phys); - if (td_data == NULL) { + if (!td_data) { retval = -ENOMEM; goto err_alloc_phys; } @@ -3322,7 +3322,7 @@ static int udc_pci_probe( } dev->virt_addr = ioremap_nocache(resource, len); - if (dev->virt_addr == NULL) { + if (!dev->virt_addr) { dev_dbg(&pdev->dev, "start address cannot be mapped\n"); retval = -EFAULT; goto err_ioremap; |