Hi Fabio, On 30.07.2015 17:20, Fabio Estevam wrote: > Hi Maciej, > > On Thu, Jul 30, 2015 at 11:33 AM, Maciej S. Szmigiero > <[email protected]> wrote: > >> static unsigned short fsl_ssi_ac97_read(struct snd_ac97 *ac97, >> @@ -1151,6 +1160,14 @@ static unsigned short fsl_ssi_ac97_read(struct >> snd_ac97 *ac97, >> unsigned short val = -1; >> u32 reg_val; >> unsigned int lreg; >> + int ret; >> + >> + ret = clk_prepare_enable(fsl_ac97_data->clk); >> + if (ret) { >> + pr_err("ac97 read clk_prepare_enable failed: %d\n", >> + ret); >> + return -1; > > return ret, please. >
This function normal return value is an AC'97 register value, so isn't more appropriate to return 0xffff in case of error than linux error code? Best regards, Maciej Szmigiero -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

