lkml.org 
[lkml]   [2017]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Jay Vosburgh <jay.vosburgh@canonical.com> writes:
> Michael J Dilmore <michael.j.dilmore@gmail.com> wrote:
>
>>if (WARN_ON(!new_active_slave) {
>> netdev_dbg("Can't add new active slave - pointer null");
>> return ERROR_CODE
>>}
>
> In general, yes, but in this case, the condition should be
> impossible to hit, so BUG_ON seems appropriate.

If it really is impossible then you should simply remove the test. No
need to test for the impossible, is there?


Bj=C3=B8rn

\
 
 \ /
  Last update: 2017-06-22 20:01    [W:0.034 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site