]> git.baikalelectronics.ru Git - kernel.git/commit
extcon: Check for incorrect connection type in notifier register
authorStephen Boyd <stephen.boyd@linaro.org>
Thu, 23 Jun 2016 10:34:30 +0000 (19:34 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 23 Jun 2016 10:35:10 +0000 (19:35 +0900)
commita64b00c03f3c9ec7757e77dcbe45d26679f9b9d6
treeda73c58dfbbd8e873c86a939f506fd93640c014c
parent3ee6f1fac77634c55911a71c14e44a3d850cfcfe
extcon: Check for incorrect connection type in notifier register

If we call extcon_register_notifier() with the wrong cable type,
it blows up with an oops instead of returning an error code.
Let's be nice and fail gracefully given that the consumer might
not know if the cable is supported by the extcon provider.

Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon.c