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:
parent
f6a17bdbd4
commit
6f6dffa4a6
1 changed files with 25 additions and 25 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue