aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/gdm724x/gdm_tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/gdm724x/gdm_tty.c')
-rw-r--r--drivers/staging/gdm724x/gdm_tty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
index 001348ccacf9..e2c0f228f369 100644
--- a/drivers/staging/gdm724x/gdm_tty.c
+++ b/drivers/staging/gdm724x/gdm_tty.c
@@ -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;