is_err checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux