[PATCH] staging: crystalhd: fix signed bug

Vasiliy Kulikov segooon at gmail.com
Sun Sep 12 18:56:51 UTC 2010


chd_dec_major is unsigned, so check chd_dec_major < 0 doesn't make sense.
Since it is used as signed, declare it as int.

Signed-off-by: Vasiliy Kulikov <segooon at gmail.com>
---
 Compile tested.

 drivers/staging/crystalhd/crystalhd_lnx.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/crystalhd/crystalhd_lnx.h b/drivers/staging/crystalhd/crystalhd_lnx.h
index c951e43..a2b5a56 100644
--- a/drivers/staging/crystalhd/crystalhd_lnx.h
+++ b/drivers/staging/crystalhd/crystalhd_lnx.h
@@ -76,7 +76,7 @@ struct crystalhd_adp {
 	spinlock_t		lock;
 
 	/* API Related */
-	unsigned int		chd_dec_major;
+	int		chd_dec_major;
 	unsigned int		cfg_users;
 
 	struct crystalhd_ioctl_data	*idata_free_head;	/* ioctl data pool */
-- 
1.7.0.4




More information about the devel mailing list