Re: [Outreachy kernel] [PATCH v2 1/2] staging: atomisp2: cleanup null check on memory allocation

2017-10-14 Thread Julia Lawall
On Sat, 14 Oct 2017, Aishwarya Pant wrote: > For memory allocation functions that fail with a NULL return value, it > is preferred to use the (!x) test in place of (x == NULL). > > Changes in atomisp2/css2400/sh_css.c were done by hand. > > Done with the help of the following cocci script: > > @

[PATCH v2 1/2] staging: atomisp2: cleanup null check on memory allocation

2017-10-14 Thread Aishwarya Pant
For memory allocation functions that fail with a NULL return value, it is preferred to use the (!x) test in place of (x == NULL). Changes in atomisp2/css2400/sh_css.c were done by hand. Done with the help of the following cocci script: @@ type T; T* p; statement s,s1; @@ p = \(devm_kzalloc\|d