Re: [PATCH] mux: checking for IS_ERR() instead of NULL or vice versa

Peter Rosin
2017-03-14T16:47:38Z

On 2017-03-14 08:56, Dan Carpenter wrote:
> This error handling is mixed up. mux_chip_alloc() doesn't return error
> pointers but devm_mux_chip_alloc() does.
>
> Fixes: 4f5078327db1 ("mux: minimal mux subsystem and gpio-based mux controller")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Eeek, thanks for pointing this out! I have apparently stared at this for
too long...

However, you did not update the documentation (in include/linux/mux.h) to
match the code, so I'm going to use an alternative (and more localized) patch
instead to align the code with the documentation.

Patch in followup email, please review! I also updated the Fixes tag
since I have amended the buggy patch since the version that is currently
in linux-next was picked up (linux-next isn't getting any updates this
week, which is why you're seeing "old" stuff).

Cheers,
Peter