staging: dgap: redundant NULL and magic check in dgap_get_modem_info()
authorDaeseok Youn <daeseok.youn@gmail.com>
Fri, 11 Jul 2014 10:22:04 +0000 (19:22 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Jul 2014 00:35:45 +0000 (17:35 -0700)
The "ch" is already checking in caller.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c

index 9affc5bf7228ac283d7fc7fdf1d0cc23952df1e6..79ea11696a23a247d5f3a3ede126c7297eef1d6c 100644 (file)
@@ -3061,9 +3061,6 @@ static int dgap_get_modem_info(struct channel_t *ch, unsigned int __user *value)
        ulong lock_flags;
        int rc;
 
-       if (!ch || ch->magic != DGAP_CHANNEL_MAGIC)
-               return -EIO;
-
        spin_lock_irqsave(&ch->ch_lock, lock_flags);
 
        mstat = readb(&(ch->ch_bs->m_stat));
This page took 0.027884 seconds and 5 git commands to generate.