25 Nov
2014
25 Nov
'14
1:11 p.m.
On Tue, Nov 18, 2014 at 04:50:19PM +0800, Bard Liao wrote:
@@ -2209,6 +2209,10 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec) int gpio_state, jack_type = 0; unsigned int val;
- if (!gpio_is_valid(rt5645->pdata.hp_det_gpio)) {
dev_err(codec->dev, "invalid gpio\n");
return 0;
- }
It's not obvious that we should be returning 0 here - shouldn't we be returning an error? After all an error message is being displayed.