Commit 4691720
bnx2: remove deadcode in bnx2_init_cpus()
The load_cpu_fw function has no error return code
and always returns zero. Checking the value returned by
this function does not make sense.
Now checking the value of the return value is misleading when reading
the code. Path with error handling was deleted in 57579f7
("bnx2: Use request_firmware()").
As a result, bnx2_init_cpus() will also return only zero
Therefore, it will be safe to change the type of functions
to void and remove checking to improving readability.
Found by Security Code and Linux Verification
Center (linuxtesting.org) with SVACE
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Maxim Korotkov <korotkov.maxim.s@gmail.com>
Link: https://lore.kernel.org/r/20230322162843.3452-1-korotkov.maxim.s@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 0c04328 commit 4691720
1 file changed
+8
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3828 | 3828 | | |
3829 | 3829 | | |
3830 | 3830 | | |
3831 | | - | |
| 3831 | + | |
3832 | 3832 | | |
3833 | 3833 | | |
3834 | 3834 | | |
| |||
3896 | 3896 | | |
3897 | 3897 | | |
3898 | 3898 | | |
3899 | | - | |
3900 | | - | |
3901 | 3899 | | |
3902 | 3900 | | |
3903 | | - | |
| 3901 | + | |
3904 | 3902 | | |
3905 | 3903 | | |
3906 | 3904 | | |
3907 | 3905 | | |
3908 | 3906 | | |
3909 | 3907 | | |
3910 | | - | |
3911 | 3908 | | |
3912 | 3909 | | |
3913 | 3910 | | |
3914 | 3911 | | |
3915 | 3912 | | |
3916 | 3913 | | |
3917 | | - | |
3918 | | - | |
3919 | | - | |
| 3914 | + | |
3920 | 3915 | | |
3921 | 3916 | | |
3922 | | - | |
3923 | | - | |
3924 | | - | |
| 3917 | + | |
3925 | 3918 | | |
3926 | 3919 | | |
3927 | | - | |
3928 | | - | |
3929 | | - | |
| 3920 | + | |
3930 | 3921 | | |
3931 | 3922 | | |
3932 | | - | |
3933 | | - | |
3934 | | - | |
| 3923 | + | |
3935 | 3924 | | |
3936 | 3925 | | |
3937 | | - | |
3938 | | - | |
3939 | | - | |
3940 | | - | |
| 3926 | + | |
3941 | 3927 | | |
3942 | 3928 | | |
3943 | 3929 | | |
| |||
4950 | 4936 | | |
4951 | 4937 | | |
4952 | 4938 | | |
4953 | | - | |
4954 | | - | |
| 4939 | + | |
4955 | 4940 | | |
4956 | 4941 | | |
4957 | 4942 | | |
| |||
0 commit comments