• M
    [media] drxk: Fix a bug at some switches that broke DVB-T · 320ed23e
    Mauro Carvalho Chehab 提交于
    The error propagation changeset c23bf4402 broke the DVB-T
    code.
    
    The legacy way for propagate errors was:
    
    do {
    	status = foo_func()
    	if (status < 0)
    		break;
    } while (0);
    return status;
    
    However, on a few places, it was doing:
    do {
    	switch(foo) {
    	case bar:
    		status = foo_func()
    		if (status < 0)
    			break;
    		break;
    	}
    	switch(foo2) {
    	case bar:
    		status = foo_func()
    		if (status < 0)
    			break;
    		break;
    	}
    	...
    } while (0);
    return (status)
    
    The inner error break were not working, as it were breaking only
    the switch, instead of the do. The solution used were to do a
    s/break/goto error/ at the inner breaks, but preserving the last
    break. Onfortunately, on a few switches, the replacement were
    applied also to the final break for the case statements.
    
    Fix the broken logic, by reverting them to break, where pertinent,
    in order to fix DVB-T support.
    Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
    320ed23e
drxk_hard.c 167.2 KB