pr_info("=== %s()\n", __func__);
- if (udc == NULL) {
+ if (!udc) {
pr_err("%s udc == NULL\n", __func__);
return;
}
struct usb_ctrlrequest *p_ctrl;
struct nbu2ss_udc *udc;
- if ((_ep == NULL) || (_req == NULL))
+ if ((!_ep) || (!_req))
return;
udc = (struct nbu2ss_udc *)_req->context;
else
req = list_entry(ep->queue.next, struct nbu2ss_req, queue);
- if (req == NULL)
+ if (!req)
return;
if (ep->epnum > 0) {
/*-------------------------------------------------------------------------*/
static inline void _nbu2ss_read_request_data(struct nbu2ss_udc *udc, u32 *pdata)
{
- if ((udc == NULL) && (pdata == NULL))
+ if ((!udc) && (!pdata))
return;
*pdata = _nbu2ss_readl(&udc->p_regs->SETUP_DATA0);
else
req = list_entry(ep->queue.next, struct nbu2ss_req, queue);
- if (req == NULL)
+ if (!req)
req = &udc->ep0_req;
req->req.actual += req->div_len;
else
req = list_entry(ep->queue.next, struct nbu2ss_req, queue);
- if (req == NULL)
+ if (!req)
req = &udc->ep0_req;
nret = _nbu2ss_ep0_out_transfer(udc, ep, req);
else
req = list_entry(ep->queue.next, struct nbu2ss_req, queue);
- if (req == NULL) {
+ if (!req) {
req = &udc->ep0_req;
if (req->req.complete)
req->req.complete(&ep->ep, &req->req);
else
req = list_entry(ep->queue.next, struct nbu2ss_req, queue);
- if (req == NULL) {
+ if (!req) {
/* pr_warn("=== %s(%d) req == NULL\n", __func__, epnum); */
return;
}
struct nbu2ss_ep *ep;
struct nbu2ss_udc *udc;
- if ((_ep == NULL) || (desc == NULL)) {
+ if ((!_ep) || (!desc)) {
pr_err(" *** %s, bad param\n", __func__);
return -EINVAL;
}
ep = container_of(_ep, struct nbu2ss_ep, ep);
- if ((ep == NULL) || (ep->udc == NULL)) {
+ if ((!ep) || (!ep->udc)) {
pr_err(" *** %s, ep == NULL !!\n", __func__);
return -EINVAL;
}
if (udc->vbus_active == 0)
return -ESHUTDOWN;
- if ((udc->driver == NULL)
+ if ((!udc->driver)
|| (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
dev_err(ep->udc->dev, " *** %s, udc !!\n", __func__);
struct nbu2ss_udc *udc;
unsigned long flags;
- if (_ep == NULL) {
+ if (!_ep) {
pr_err(" *** %s, bad param\n", __func__);
return -EINVAL;
}
ep = container_of(_ep, struct nbu2ss_ep, ep);
- if ((ep == NULL) || (ep->udc == NULL)) {
+ if ((!ep) || (!ep->udc)) {
pr_err("udc: *** %s, ep == NULL !!\n", __func__);
return -EINVAL;
}
{
struct nbu2ss_req *req;
- if (_req != NULL) {
+ if (_req) {
req = container_of(_req, struct nbu2ss_req, req);
kfree(req);
int result = -EINVAL;
/* catch various bogus parameters */
- if ((_ep == NULL) || (_req == NULL)) {
- if (_ep == NULL)
+ if ((!_ep) || (!_req)) {
+ if (!_ep)
pr_err("udc: %s --- _ep == NULL\n", __func__);
- if (_req == NULL)
+ if (!_req)
pr_err("udc: %s --- _req == NULL\n", __func__);
return -EINVAL;
req->unaligned = FALSE;
if (req->unaligned) {
- if (ep->virt_buf == NULL)
+ if (!ep->virt_buf)
ep->virt_buf = (u8 *)dma_alloc_coherent(
NULL, PAGE_SIZE,
&ep->phys_buf, GFP_ATOMIC | GFP_DMA);
unsigned long flags;
/* catch various bogus parameters */
- if ((_ep == NULL) || (_req == NULL)) {
+ if ((!_ep) || (!_req)) {
/* pr_err("%s, bad param(1)\n", __func__); */
return -EINVAL;
}
}
udc = ep->udc;
- if (udc == NULL)
+ if (!udc)
return -EINVAL;
spin_lock_irqsave(&udc->lock, flags);
u32 data;
struct nbu2ss_udc *udc;
- if (pgadget == NULL) {
+ if (!pgadget) {
pr_err("udc: %s, bad param\n", __func__);
return -EINVAL;
}
udc = container_of(pgadget, struct nbu2ss_udc, gadget);
- if (udc == NULL) {
+ if (!udc) {
dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__);
return -EINVAL;
}
struct nbu2ss_udc *udc;
- if (pgadget == NULL) {
+ if (!pgadget) {
pr_err("%s, bad param\n", __func__);
return -EINVAL;
}
udc = container_of(pgadget, struct nbu2ss_udc, gadget);
- if (udc == NULL) {
+ if (!udc) {
dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__);
return -EINVAL;
}
struct nbu2ss_udc *udc;
unsigned long flags;
- if (pgadget == NULL) {
+ if (!pgadget) {
pr_err("%s, bad param\n", __func__);
return -EINVAL;
}
struct nbu2ss_udc *udc;
unsigned long flags;
- if (pgadget == NULL) {
+ if (!pgadget) {
pr_err("%s, bad param\n", __func__);
return -EINVAL;
}
struct nbu2ss_udc *udc;
unsigned long flags;
- if (pgadget == NULL) {
+ if (!pgadget) {
pr_err("%s, bad param\n", __func__);
return -EINVAL;
}
udc = container_of(pgadget, struct nbu2ss_udc, gadget);
- if (udc->driver == NULL) {
+ if (!udc->driver) {
pr_warn("%s, Not Regist Driver\n", __func__);
return -EINVAL;
}
struct nbu2ss_udc *udc;
udc = platform_get_drvdata(pdev);
- if (udc == NULL)
+ if (!udc)
return;
_nbu2ss_disable_controller(udc);
struct nbu2ss_udc *udc;
udc = platform_get_drvdata(pdev);
- if (udc == NULL)
+ if (!udc)
return 0;
if (udc->vbus_active) {
struct nbu2ss_udc *udc;
udc = platform_get_drvdata(pdev);
- if (udc == NULL)
+ if (!udc)
return 0;
data = gpio_get_value(VBUS_VALUE);