Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mfd: kempld: Remove dead code

scnprintf() never returns negative value, drop the respective dead code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240223195113.880121-7-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Andy Shevchenko and committed by
Lee Jones
db851687 de584f72

+2 -5
+2 -5
drivers/mfd/kempld-core.c
··· 294 294 else 295 295 minor = (pld->info.minor - 10) + 'A'; 296 296 297 - ret = scnprintf(pld->info.version, sizeof(pld->info.version), 298 - "P%X%c%c.%04X", pld->info.number, major, minor, 299 - pld->info.buildnr); 300 - if (ret < 0) 301 - return ret; 297 + scnprintf(pld->info.version, sizeof(pld->info.version), "P%X%c%c.%04X", 298 + pld->info.number, major, minor, pld->info.buildnr); 302 299 303 300 return 0; 304 301 }