{
struct n_hdlc *n_hdlc = tty->disc_data;
- if (!n_hdlc)
- return;
-
if (n_hdlc->magic != HDLC_MAGIC) {
printk(KERN_WARNING "n_hdlc: trying to close unopened tty!\n");
return;
{
struct n_hdlc *n_hdlc = tty->disc_data;
- if (!n_hdlc)
- return;
-
n_hdlc_send_frames (n_hdlc, tty);
-
} /* end of n_hdlc_tty_wakeup() */
/**
pr_debug("%s(%d)%s() called count=%d\n",
__FILE__, __LINE__, __func__, count);
- /* This can happen if stuff comes in on the backup tty */
- if (!n_hdlc)
- return;
-
/* verify line is using HDLC discipline */
if (n_hdlc->magic != HDLC_MAGIC) {
printk("%s(%d) line not using HDLC discipline\n",
struct n_hdlc_buf *rbuf;
DECLARE_WAITQUEUE(wait, current);
- /* Validate the pointers */
- if (!n_hdlc)
- return -EIO;
-
/* verify user access to buffer */
if (!access_ok(buf, nr)) {
printk(KERN_WARNING "%s(%d) n_hdlc_tty_read() can't verify user "
pr_debug("%s(%d)%s() called count=%zd\n", __FILE__, __LINE__, __func__,
count);
- /* Verify pointers */
- if (!n_hdlc)
- return -EIO;
-
if (n_hdlc->magic != HDLC_MAGIC)
return -EIO;
break;
}
schedule();
-
- n_hdlc = tty->disc_data;
- if (!n_hdlc || n_hdlc->magic != HDLC_MAGIC) {
- printk("n_hdlc_tty_write: %p invalid after wait!\n", n_hdlc);
- error = -EIO;
- break;
- }
-
+
if (signal_pending(current)) {
error = -EINTR;
break;
pr_debug("%s(%d)%s() called %d\n", __FILE__, __LINE__, __func__, cmd);
/* Verify the status of the device */
- if (!n_hdlc || n_hdlc->magic != HDLC_MAGIC)
+ if (n_hdlc->magic != HDLC_MAGIC)
return -EBADF;
switch (cmd) {
struct n_hdlc *n_hdlc = tty->disc_data;
__poll_t mask = 0;
- if (!n_hdlc || n_hdlc->magic != HDLC_MAGIC)
+ if (n_hdlc->magic != HDLC_MAGIC)
return 0;
/*