UPSTREAM: 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)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 3 Aug 2016 01:38:02 +0000 (09:38 +0800)
commit076907279ace8c14304f6a428ef5c5ed091c24ee
treebcd184ce6d40c66d9cf8de4a5c843df3911aaa72
parent6c77332be4c0142363b4fd83c5801ba4c18d0088
UPSTREAM: 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.

Change-Id: I6e357a6af600dac82e9b1c30499b2d0a3d58d716
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
(cherry picked from commit a05f44c89ee1151b0da3ddd43d9e57d8f15b2f20)
drivers/extcon/extcon.c