[lkml]   [2019]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [v5] Coccinelle: semantic code search for missing put_device()
>> Does the first SmPL when specification include the case that a call
>> of the function “put_device” can occur within a branch of an if statement?
> It does include that,

Thanks for this acknowledgement.

So it seems that you find my interpretation of this bit of SmPL code appropriate.

> but there is another execution path where the put device is not present.

It is tried to find such cases.

> But given the test in the if in the when code,
> on that execution path id is NULL, an so there is no need to put it.

I would like to point out that the function “put_device” belongs also to
the category of functions which tolerate the passing of null pointers.

Have we got still different software development opinions about the need
for an extra pointer check in the “second” SmPL when specification?


 \ /
  Last update: 2019-02-15 14:56    [W:0.068 / U:19.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site