- if (copy_from_user(tbuf->buf, data, count)) {
- /* return tx buffer to free list */
- n_hdlc_buf_put(&n_hdlc->tx_free_buf_list,tbuf);
- error = -EFAULT;
- } else {
- /* Send the data */
- tbuf->count = error = count;
- n_hdlc_buf_put(&n_hdlc->tx_buf_list,tbuf);
- n_hdlc_send_frames(n_hdlc,tty);
- }
+ memcpy(tbuf->buf, data, count);
+
+ /* Send the data */
+ tbuf->count = error = count;
+ n_hdlc_buf_put(&n_hdlc->tx_buf_list,tbuf);
+ n_hdlc_send_frames(n_hdlc,tty);