video: smscufx: Less checks in ufx_usb_probe() after error detection
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 28 Mar 2018 14:34:27 +0000 (16:34 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Wed, 28 Mar 2018 14:34:27 +0000 (16:34 +0200)
commitdaa0524bc0a07048e33fdb61cae30467ef4ceff7
treecf6817acd27a627678111944c8d96cc87c2c97b7
parent3c097b069bb82391fcad73373eccbca8400636e7
video: smscufx: Less checks in ufx_usb_probe() after error detection

Up to four checks could be repeated by the ufx_usb_probe() function
during error handling even if the relevant properties can be determined
for the involved variables before by source code analysis.

* Return directly after a call of the function "kzalloc" failed
  at the beginning.

* Adjust jump targets so that extra checks can be omitted at the end.

* Delete initialisations for the variables "info" and "retval"
  which became unnecessary with this refactoring.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Cc: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/smscufx.c