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.

misc: keba: Use variable ret for return values

One function of the cp500 driver uses the variable name retval for
return values but all others use the variable name ret. Use ret for
return values in all functions.

Signed-off-by: Gerhard Engleder <eg@keba.com>
Link: https://lore.kernel.org/r/20241011191257.19702-2-gerhard@engleder-embedded.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Gerhard Engleder and committed by
Greg Kroah-Hartman
d9996de4 dcf6e7cf

+7 -7
+7 -7
drivers/misc/keba/cp500.c
··· 229 229 230 230 static int cp500_register_i2c(struct cp500 *cp500) 231 231 { 232 - int retval; 232 + int ret; 233 233 234 234 cp500->i2c = kzalloc(sizeof(*cp500->i2c), GFP_KERNEL); 235 235 if (!cp500->i2c) ··· 251 251 cp500->i2c->info_size = ARRAY_SIZE(cp500_i2c_info); 252 252 cp500->i2c->info = cp500_i2c_info; 253 253 254 - retval = auxiliary_device_init(&cp500->i2c->auxdev); 255 - if (retval) { 254 + ret = auxiliary_device_init(&cp500->i2c->auxdev); 255 + if (ret) { 256 256 kfree(cp500->i2c); 257 257 cp500->i2c = NULL; 258 258 259 - return retval; 259 + return ret; 260 260 } 261 - retval = __auxiliary_device_add(&cp500->i2c->auxdev, "keba"); 262 - if (retval) { 261 + ret = __auxiliary_device_add(&cp500->i2c->auxdev, "keba"); 262 + if (ret) { 263 263 auxiliary_device_uninit(&cp500->i2c->auxdev); 264 264 cp500->i2c = NULL; 265 265 266 - return retval; 266 + return ret; 267 267 } 268 268 269 269 return 0;