Skip to content

Commit 8083f58

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: Make pwmchip_remove() return void
Since some time pwmchip_remove() always returns 0 so the return value isn't usefull. Now that all callers are converted to ignore its value the function can be changed to return void. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 7587f8a commit 8083f58

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

drivers/pwm/core.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ EXPORT_SYMBOL_GPL(pwmchip_add);
304304
*
305305
* Returns: 0 on success or a negative error code on failure.
306306
*/
307-
int pwmchip_remove(struct pwm_chip *chip)
307+
void pwmchip_remove(struct pwm_chip *chip)
308308
{
309309
pwmchip_sysfs_unexport(chip);
310310

@@ -318,8 +318,6 @@ int pwmchip_remove(struct pwm_chip *chip)
318318
free_pwms(chip);
319319

320320
mutex_unlock(&pwm_lock);
321-
322-
return 0;
323321
}
324322
EXPORT_SYMBOL_GPL(pwmchip_remove);
325323

include/linux/pwm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ int pwm_set_chip_data(struct pwm_device *pwm, void *data);
404404
void *pwm_get_chip_data(struct pwm_device *pwm);
405405

406406
int pwmchip_add(struct pwm_chip *chip);
407-
int pwmchip_remove(struct pwm_chip *chip);
407+
void pwmchip_remove(struct pwm_chip *chip);
408408

409409
int devm_pwmchip_add(struct device *dev, struct pwm_chip *chip);
410410

0 commit comments

Comments
 (0)