These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / staging / gdm724x / gdm_tty.c
index 001348c..e2c0f22 100644 (file)
@@ -88,7 +88,7 @@ static int gdm_tty_install(struct tty_driver *driver, struct tty_struct *tty)
 
        mutex_lock(&gdm_table_lock);
        gdm = gdm_table[i][j];
-       if (gdm == NULL) {
+       if (!gdm) {
                mutex_unlock(&gdm_table_lock);
                return -ENODEV;
        }
@@ -167,7 +167,7 @@ static int gdm_tty_recv_complete(void *data,
 
 static void gdm_tty_send_complete(void *arg)
 {
-       struct gdm *gdm = (struct gdm *)arg;
+       struct gdm *gdm = arg;
 
        if (!GDM_TTY_READY(gdm))
                return;
@@ -193,7 +193,7 @@ static int gdm_tty_write(struct tty_struct *tty, const unsigned char *buf,
                sending_len = remain > MUX_TX_MAX_SIZE ? MUX_TX_MAX_SIZE :
                                                         remain;
                gdm_tty_send(gdm,
-                            (void *)(buf+sent_len),
+                            (void *)(buf + sent_len),
                             sending_len,
                             gdm->index,
                             gdm_tty_send_complete,
@@ -226,7 +226,7 @@ int register_lte_tty_device(struct tty_dev *tty_dev, struct device *device)
 
        for (i = 0; i < TTY_MAX_COUNT; i++) {
 
-               gdm = kmalloc(sizeof(struct gdm), GFP_KERNEL);
+               gdm = kmalloc(sizeof(*gdm), GFP_KERNEL);
                if (!gdm)
                        return -ENOMEM;