Messages in this thread | | | Date | Sat, 23 Jul 2016 16:56:14 +0200 (CEST) | From | Julia Lawall <> | Subject | is_err checking |
| |
Code like the following looks a bit clunky to me:
if (IS_ERR(data->clk) && PTR_ERR(data->clk) != -EPROBE_DEFER)
Is there any reason not to always use eg
data->clk == ERR_PTR(-EPROBE_DEFER)
Code of the latter form is a bit more popular. Perhaps one could want something like:
IS_ERR_VALUE(data->clk, -EPROBE_DEFER)
but IS_ERR_VALUE is laready used for something else.
julia
| |