Skip to content

Commit 85c2566

Browse files
Uwe Kleine-Königtiwai
authored andcommitted
ALSA: hda: cs35l41: Make cs35l41_hda_remove() return void
Up to now cs35l41_hda_remove() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c and spi remove callbacks is ignored anyway. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Lucas Tanure <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 8c286a0 commit 85c2566

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

sound/pci/hda/cs35l41_hda.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i
525525
}
526526
EXPORT_SYMBOL_NS_GPL(cs35l41_hda_probe, SND_HDA_SCODEC_CS35L41);
527527

528-
int cs35l41_hda_remove(struct device *dev)
528+
void cs35l41_hda_remove(struct device *dev)
529529
{
530530
struct cs35l41_hda *cs35l41 = dev_get_drvdata(dev);
531531

@@ -534,8 +534,6 @@ int cs35l41_hda_remove(struct device *dev)
534534
if (!cs35l41->vspk_always_on)
535535
gpiod_set_value_cansleep(cs35l41->reset_gpio, 0);
536536
gpiod_put(cs35l41->reset_gpio);
537-
538-
return 0;
539537
}
540538
EXPORT_SYMBOL_NS_GPL(cs35l41_hda_remove, SND_HDA_SCODEC_CS35L41);
541539

sound/pci/hda/cs35l41_hda.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ struct cs35l41_hda {
6464

6565
int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int irq,
6666
struct regmap *regmap);
67-
int cs35l41_hda_remove(struct device *dev);
67+
void cs35l41_hda_remove(struct device *dev);
6868

6969
#endif /*__CS35L41_HDA_H__*/

sound/pci/hda/cs35l41_hda_i2c.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ static int cs35l41_hda_i2c_probe(struct i2c_client *clt, const struct i2c_device
3232

3333
static int cs35l41_hda_i2c_remove(struct i2c_client *clt)
3434
{
35-
return cs35l41_hda_remove(&clt->dev);
35+
cs35l41_hda_remove(&clt->dev);
36+
37+
return 0;
3638
}
3739

3840
static const struct i2c_device_id cs35l41_hda_i2c_id[] = {

sound/pci/hda/cs35l41_hda_spi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ static int cs35l41_hda_spi_probe(struct spi_device *spi)
3030

3131
static int cs35l41_hda_spi_remove(struct spi_device *spi)
3232
{
33-
return cs35l41_hda_remove(&spi->dev);
33+
cs35l41_hda_remove(&spi->dev);
34+
35+
return 0;
3436
}
3537

3638
static const struct spi_device_id cs35l41_hda_spi_id[] = {

0 commit comments

Comments
 (0)