staging: westbridge: improve error path
authorVasiliy Kulikov <segooon@gmail.com>
Sun, 5 Sep 2010 18:32:53 +0000 (22:32 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 5 Sep 2010 23:59:54 +0000 (16:59 -0700)
commit7b1f6bfb03cca84af40aa9142ddf99ace9894f6e
treef8c3ab8daa4dff494694490c397c79beb43ae59c
parentec53d6123bea9f69887f194b5d4294a43292120d
staging: westbridge: improve error path

kmalloc() may fail, check for it.
Allocated memory is not freed.
Use IS_ERR() instead of strict checking.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Cc: David Cross <david.cross@cypress.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/westbridge/astoria/gadget/cyasgadget.c