make init_error signed in synclink_gt.c
Subsystems (2)
PATCH 1/1 make init_error signed in synclink_gt.c
G'day list
I noticed struct member init_error was used as a signed value (to return a -ve on error) but was an unsigned int.
examples of it's miss-use are
3112 info->init_error = -1;
4440 if ((info->init_error = register_test(info)) < 0) {
The patch below converts it from an 'unsigned int', to a plain 'int'. Patch is compile tested.
Signed-off-by Darren Jenkins <[email protected]>
drivers/char/synclink_gt.c renamed from drivers/char/synclink_gt.c.orig +1 -1
@@ -306,7 +306,7 @@ struct slgt_info {int tx_active;unsigned char signals;/* serial signal states */ -unsigned int init_error;/* initialization error */ +int init_error;/* initialization error */ unsigned char *tx_buf;int tx_count;
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors