IGbE: return 0 on an invalid descriptor size instead of -1.
Asserts where descSize() get called with assert if we end up returning 0.
This commit is contained in:
parent
7f6ca0981f
commit
0f039fe447
1 changed files with 2 additions and 2 deletions
|
@ -484,12 +484,12 @@ struct Regs {
|
||||||
unsigned descSize()
|
unsigned descSize()
|
||||||
{
|
{
|
||||||
switch(bsize()) {
|
switch(bsize()) {
|
||||||
case 0: return bsex() == 0 ? 2048 : -1;
|
case 0: return bsex() == 0 ? 2048 : 0;
|
||||||
case 1: return bsex() == 0 ? 1024 : 16384;
|
case 1: return bsex() == 0 ? 1024 : 16384;
|
||||||
case 2: return bsex() == 0 ? 512 : 8192;
|
case 2: return bsex() == 0 ? 512 : 8192;
|
||||||
case 3: return bsex() == 0 ? 256 : 4096;
|
case 3: return bsex() == 0 ? 256 : 4096;
|
||||||
default:
|
default:
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue