From: Andrzej Pietrasiewicz Date: Tue, 3 Mar 2015 09:52:09 +0000 (+0100) Subject: usb: gadget: printer: add missing error handling X-Git-Tag: omap-for-v4.1/fixes-rc1~167^2~55^2~63 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44b316525986252bb95d356419fc9e75f0532112;p=pandora-kernel.git usb: gadget: printer: add missing error handling If cdev_add() in printer_bind_config() fails, care is taken to reverse the effects of initializations completed until the fail happens. But if printer_req_alloc() fails, it is just one of the two lists that is cleaned up while the effects of cdev_add() and device_create() are not reverted. This patch changes error handling so that at least as much cleanup is done as when a failure happens before printer_req_alloc() invocations. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed