[PATCH] radio-cadet: check request_region() return value correctly

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Alexey Dobriyan 2005-10-14 15:59:04 -07:00 committed by Linus Torvalds
parent c6ecf7ed31
commit f1ac046d7b

View File

@ -543,7 +543,7 @@ static int cadet_probe(void)
for(i=0;i<8;i++) {
io=iovals[i];
if(request_region(io,2, "cadet-probe")>=0) {
if (request_region(io, 2, "cadet-probe")) {
cadet_setfreq(1410);
if(cadet_getfreq()==1410) {
release_region(io, 2);