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

Commit c3614339 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: f_gsi: Get rid of unneeded NULL check in gsi_ctrl_dev_write"

parents 4de87369 614aa86d
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1339,7 +1339,6 @@ static ssize_t gsi_ctrl_dev_write(struct file *fp, const char __user *buf,
	unsigned long flags;
	struct gsi_ctrl_pkt *cpkt;
	struct gsi_ctrl_port *c_port;
	struct usb_request *req;
	enum ipa_usb_teth_prot prot_id =
		*(enum ipa_usb_teth_prot *)(fp->private_data);
	struct gsi_inst_status *inst_cur = &inst_status[prot_id];
@@ -1358,13 +1357,6 @@ static ssize_t gsi_ctrl_dev_write(struct file *fp, const char __user *buf,

	gsi = inst_cur->opts->gsi;
	c_port = &gsi->c_port;
	req = c_port->notify_req;

	if (!c_port || !req || !req->buf) {
		log_event_err("%s: c_port %pK req %p req->buf %p",
			__func__, c_port, req, req ? req->buf : req);
		return -ENODEV;
	}

	if (!count || count > GSI_MAX_CTRL_PKT_SIZE) {
		log_event_err("error: ctrl pkt length %zu", count);