Commit e9a1de3
net: ena: fix error returning in ena_com_get_hash_function()
In case the "func" parameter is NULL we now return "-EINVAL".
This shouldn't happen in general, but when it does happen, this is the
proper way to handle it.
We also check func for NULL in the beginning of the function, as there
is no reason to do all the work and realize in the end of the function
it was useless.
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 80f8443 commit e9a1de3
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2347 | 2347 | | |
2348 | 2348 | | |
2349 | 2349 | | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
2350 | 2353 | | |
2351 | 2354 | | |
2352 | 2355 | | |
| |||
2359 | 2362 | | |
2360 | 2363 | | |
2361 | 2364 | | |
2362 | | - | |
2363 | | - | |
| 2365 | + | |
2364 | 2366 | | |
2365 | 2367 | | |
2366 | 2368 | | |
| |||
0 commit comments