diff options
author | Harsh Kumar <harsh1kumar@gmail.com> | 2013-05-31 21:00:42 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-03 12:32:00 -0700 |
commit | d3d472b6e57e55132a0c2a048e3b18759c73ee7b (patch) | |
tree | 01b10867e2dc7d01629efb6a6d293bcc89150143 /security | |
parent | bf1ace2a3f0d133a662727f238928654bdc1d1b3 (diff) |
Staging: winbond: Check for unsuccessful allocation immediately
Check to see if allocation by kzalloc() or usb_alloc_urb() was unsuccessful
immediately after the allocation. Exit from the function can be right at that
point in case of allocation failure.
This avoids unnecessary use of usb_alloc_urb() & usb_free_urb() if kzalloc()
returns NULL.
Also, makes the code better structured & easier to understand.
Signed-off-by: Harsh Kumar <harsh1kumar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions