[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20080330231253.GG28445@cs181133002.pp.htv.fi>
Date: Mon, 31 Mar 2008 02:12:53 +0300
From: Adrian Bunk <bunk@...nel.org>
To: linux-kernel@...r.kernel.org
Subject: [2.6 patch] char/n_hdlc.c: don't use 0 as NULL pointer
Don't use 0 as NULL pointer.
Spotted by sparse.
Signed-off-by: Adrian Bunk <bunk@...nel.org>
---
39d28b33b48bbec91bfbd0e761c2f1e3e1d08b88 diff --git a/drivers/char/n_hdlc.c b/drivers/char/n_hdlc.c
index 82bcfb9..9e6145a 100644
--- a/drivers/char/n_hdlc.c
+++ b/drivers/char/n_hdlc.c
@@ -501,7 +501,7 @@ static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *data,
__FILE__,__LINE__, count);
/* This can happen if stuff comes in on the backup tty */
- if (n_hdlc == 0 || tty != n_hdlc->tty)
+ if (n_hdlc == NULL || tty != n_hdlc->tty)
return;
/* verify line is using HDLC discipline */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists