check request_region return value in ixj.c
PATCH 1/1 check request_region return value in ixj.c
G'day list,
ixj.c calles request_region without checking the return value @ line 6805.
The patch below just alters the code so this request_region is handled like the others. (This one looks like it was missed in a conversion somewhere).
Alexey, if you want me to do a wrapper fn or macro for the 6 cases where this is done almost the same, (perhaps making them return -EBUSY) yell out.
Signed-off-by Darren Jenkins <[email protected]>
drivers/telephony/ixj.c renamed from drivers/telephony/ixj.c.orig +5 -1
@@ -6802,7 +6802,11 @@ static int ixj_selfprobe(IXJ *j) } }else if (j->dsp.low ==0x22 ) { j->cardtype =QTI_PHONEJACK_PCI ; -request_region (j->XILINXbase,4 ,"ixj control" ); +if (!request_region (j->XILINXbase,4 ,"ixj control" )) { +printk (KERN_WARNING "ixj : can't get I/O " +"address 0x%x\n" , j->XILINXbase); +return -1 ; + } j->pld_slicw.pcib.e1 =1 ;outb_p (j->pld_slicw.byte, j->XILINXbase); }else
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors