Skip to content

Commit

Permalink
ASoC: uda1380: Return proper error in uda1380_modinit failure path
Browse files Browse the repository at this point in the history
Return proper error for uda1380_modinit if i2c_add_driver() fails.

Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
AxelLin authored and broonie committed Dec 4, 2011
1 parent 36d54dc commit ef14977
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/uda1380.c
Original file line number Diff line number Diff line change
Expand Up @@ -863,13 +863,13 @@ static struct i2c_driver uda1380_i2c_driver = {

static int __init uda1380_modinit(void)
{
int ret;
int ret = 0;
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
ret = i2c_add_driver(&uda1380_i2c_driver);
if (ret != 0)
pr_err("Failed to register UDA1380 I2C driver: %d\n", ret);
#endif
return 0;
return ret;
}
module_init(uda1380_modinit);

Expand Down

0 comments on commit ef14977

Please sign in to comment.