From: Kees van Reeuwijk Date: Mon, 11 Jan 2010 14:22:29 +0000 (+0000) Subject: Fixed some missing return statements. X-Git-Tag: v3.1.6~94 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=f595416e7fce892d1fce0acc4710f67bae7a606f;p=minix.git Fixed some missing return statements. --- diff --git a/drivers/amddev/amddev.c b/drivers/amddev/amddev.c index 342c969b6..3653e2243 100644 --- a/drivers/amddev/amddev.c +++ b/drivers/amddev/amddev.c @@ -59,7 +59,7 @@ static int do_del_phys(message *m); static int do_add4pci(message *m); static void add_range(u32_t busaddr, u32_t size); static void del_range(u32_t busaddr, u32_t size); -static int do_pm_notify(message *m); +static void do_pm_notify(message *m); static void report_exceptions(void); /* SEF functions and variables. */ @@ -158,6 +158,7 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info) return(OK); } +/* Returns 0 if no device found, or 1 if a device is found. */ static int find_dev(devindp, capaddrp) int *devindp; u8_t *capaddrp; @@ -178,7 +179,7 @@ u8_t *capaddrp; if (!r) { printf("amddev`find_dev: no first dev\n"); - return; + return 0; } } else @@ -187,7 +188,7 @@ u8_t *capaddrp; if (!r) { printf("amddev`find_dev: no next dev\n"); - return; + return 0; } } @@ -485,7 +486,7 @@ static void del_range(u32_t busaddr, u32_t size) } } -static int do_pm_notify(message *m) +static void do_pm_notify(message *m) { int r; endpoint_t proc_e; diff --git a/drivers/audio/es1370/es1370.c b/drivers/audio/es1370/es1370.c index d9f222acb..1c3196d67 100644 --- a/drivers/audio/es1370/es1370.c +++ b/drivers/audio/es1370/es1370.c @@ -103,6 +103,8 @@ PUBLIC int drv_init(void) { special_file[3].write_chan = DAC2_CHAN; special_file[3].read_chan = NO_CHANNEL; special_file[3].io_ctl = DAC2_CHAN; + + return OK; } @@ -267,6 +269,7 @@ int drv_start(int sub_dev, int DmaMode) { int drv_stop(int sub_dev) { u32_t enable_bit; + int status; switch(sub_dev) { case ADC1_CHAN: enable_bit = ADC1_EN;break; @@ -279,9 +282,9 @@ int drv_stop(int sub_dev) pci_outw(reg(CHIP_SEL_CTRL), pci_inw(reg(CHIP_SEL_CTRL)) & ~enable_bit); aud_conf[sub_dev].busy = 0; - disable_int(sub_dev); + status = disable_int(sub_dev); - return OK; + return status; } @@ -321,7 +324,7 @@ int drv_io_ctl(int request, void * val, int * len, int sub_dev) { status = EINVAL; break; } - return OK; + return status; } @@ -593,6 +596,7 @@ PRIVATE int disable_int(int chan) { /* clear the interrupt */ ser_interface = pci_inw(reg(SERIAL_INTERFACE_CTRL)); pci_outw(reg(SERIAL_INTERFACE_CTRL), ser_interface & ~int_en_bit); + return OK; } diff --git a/drivers/audio/es1371/es1371.c b/drivers/audio/es1371/es1371.c index 0ce25df60..be1715782 100644 --- a/drivers/audio/es1371/es1371.c +++ b/drivers/audio/es1371/es1371.c @@ -109,6 +109,8 @@ PUBLIC int drv_init(void) { special_file[3].write_chan = DAC2_CHAN; special_file[3].read_chan = NO_CHANNEL; special_file[3].io_ctl = DAC2_CHAN; + + return OK; } @@ -324,7 +326,7 @@ int drv_io_ctl(int request, void * val, int * len, int sub_dev) { status = EINVAL; break; } - return OK; + return status; } @@ -597,6 +599,7 @@ PRIVATE int disable_int(int chan) { /* clear the interrupt */ ser_interface = pci_inw(reg(SERIAL_INTERFACE_CTRL)); pci_outw(reg(SERIAL_INTERFACE_CTRL), ser_interface & ~int_en_bit); + return OK; } diff --git a/drivers/audio/framework/audio_fw.c b/drivers/audio/framework/audio_fw.c index be719cef1..e01526c99 100644 --- a/drivers/audio/framework/audio_fw.c +++ b/drivers/audio/framework/audio_fw.c @@ -403,6 +403,7 @@ PRIVATE int close_sub_dev(int sub_dev_nr) { /* free the buffers */ free(sub_dev_ptr->DmaBuf); free(sub_dev_ptr->ExtraBuf); + return OK; } diff --git a/drivers/audio/sb16/sb16.c b/drivers/audio/sb16/sb16.c index c4b924153..6329ad60a 100644 --- a/drivers/audio/sb16/sb16.c +++ b/drivers/audio/sb16/sb16.c @@ -67,6 +67,8 @@ PUBLIC int drv_init(void) { special_file[2].write_chan = NO_CHANNEL; special_file[2].read_chan = NO_CHANNEL; special_file[2].io_ctl = MIXER; + + return OK; }