Extcon: check for allocation failure
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 25 Apr 2012 08:47:02 +0000 (11:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2012 18:43:24 +0000 (11:43 -0700)
commita1d26ac0ddc4ea561e17a75dd3b5f9d3c1812f16
tree79cb1ad0ccb5b8469be07710b5576c015b899c98
parent6b9606106ba58d2bd80610f97e06fea58206b47c
Extcon: check for allocation failure

Return -ENOMEM if the kmalloc() fails.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/extcon/extcon_class.c