Since both buffers are null terminated, strncmp is not needed. Signed-off-by: Madhusudhanan Ravindran <mravindr@xxxxxxxxxxx> --- drivers/staging/fbtft/fbtft_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c index 1afeebb..ee21607 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -1334,7 +1334,7 @@ static int __init fbtft_device_init(void) } /* name=list lists all supported displays */ - if (strncmp(name, "list", 32) == 0) { + if (strcmp(name, "list") == 0) { pr_info(DRVNAME": Supported displays:\n"); for (i = 0; i < ARRAY_SIZE(displays); i++) @@ -1355,7 +1355,7 @@ static int __init fbtft_device_init(void) } for (i = 0; i < ARRAY_SIZE(displays); i++) { - if (strncmp(name, displays[i].name, 32) == 0) { + if (strcmp(name, displays[i].name) == 0) { if (displays[i].spi) { spi = displays[i].spi; spi->chip_select = cs; -- 1.9.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel