Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc2cdcaf authored by Sachin Kamat's avatar Sachin Kamat Committed by Felipe Balbi
Browse files

usb: gadget: s3c-hsudc: Replace 0 with NULL for pointers



Silences the following type of sparse warnings:
warning: Using plain integer as NULL pointer

Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent affaab4c
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -835,7 +835,7 @@ static struct usb_request *s3c_hsudc_alloc_request(struct usb_ep *_ep,


	hsreq = kzalloc(sizeof(*hsreq), gfp_flags);
	hsreq = kzalloc(sizeof(*hsreq), gfp_flags);
	if (!hsreq)
	if (!hsreq)
		return 0;
		return NULL;


	INIT_LIST_HEAD(&hsreq->queue);
	INIT_LIST_HEAD(&hsreq->queue);
	return &hsreq->req;
	return &hsreq->req;
@@ -904,16 +904,16 @@ static int s3c_hsudc_queue(struct usb_ep *_ep, struct usb_request *_req,
			csr = readl((u32)hsudc->regs + offset);
			csr = readl((u32)hsudc->regs + offset);
			if (!(csr & S3C_ESR_TX_SUCCESS) &&
			if (!(csr & S3C_ESR_TX_SUCCESS) &&
				(s3c_hsudc_write_fifo(hsep, hsreq) == 1))
				(s3c_hsudc_write_fifo(hsep, hsreq) == 1))
				hsreq = 0;
				hsreq = NULL;
		} else {
		} else {
			csr = readl((u32)hsudc->regs + offset);
			csr = readl((u32)hsudc->regs + offset);
			if ((csr & S3C_ESR_RX_SUCCESS)
			if ((csr & S3C_ESR_RX_SUCCESS)
				   && (s3c_hsudc_read_fifo(hsep, hsreq) == 1))
				   && (s3c_hsudc_read_fifo(hsep, hsreq) == 1))
				hsreq = 0;
				hsreq = NULL;
		}
		}
	}
	}


	if (hsreq != 0)
	if (hsreq)
		list_add_tail(&hsreq->queue, &hsep->queue);
		list_add_tail(&hsreq->queue, &hsep->queue);


	spin_unlock_irqrestore(&hsudc->lock, flags);
	spin_unlock_irqrestore(&hsudc->lock, flags);