summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-02-23 21:49:55 +0200
committerLee Jones <lee@kernel.org>2024-05-10 15:39:16 +0100
commitdb8516871b6d9c1f9644645c8c1ead84e219af31 (patch)
tree7d03717908b8a2aaab3a98462c0e556b0302c73e /drivers/mfd
parentde584f72ce1035b2c32351d56f3d6c147e382e37 (diff)
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>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/kempld-core.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c
index 30b8408c094e..ce7d52a62e51 100644
--- a/drivers/mfd/kempld-core.c
+++ b/drivers/mfd/kempld-core.c
@@ -294,11 +294,8 @@ static int kempld_get_info(struct kempld_device_data *pld)
else
minor = (pld->info.minor - 10) + 'A';
- ret = scnprintf(pld->info.version, sizeof(pld->info.version),
- "P%X%c%c.%04X", pld->info.number, major, minor,
- pld->info.buildnr);
- if (ret < 0)
- return ret;
+ scnprintf(pld->info.version, sizeof(pld->info.version), "P%X%c%c.%04X",
+ pld->info.number, major, minor, pld->info.buildnr);
return 0;
}