adc-as3514.c: cosmetics

reduce indentation level, return early on error condition

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26063 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2010-05-15 19:44:54 +00:00
parent f6a17bdbd4
commit 6f6dffa4a6

View file

@ -28,8 +28,9 @@ unsigned short adc_read(int channel)
{
unsigned short data = 0;
if ((unsigned)channel < NUM_ADC_CHANNELS)
{
if ((unsigned)channel >= NUM_ADC_CHANNELS)
return 0;
ascodec_lock();
/* Select channel */
@ -57,7 +58,6 @@ unsigned short adc_read(int channel)
}
ascodec_unlock();
}
return data;
}