Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: uss720.c: move assignment out of if () block

We should not be doing assignments within an if () block
so fix up the code to not do this.

change was created using Coccinelle.

CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Felipe Balbi <balbi@ti.com>

+4 -2
+4 -2
drivers/usb/misc/uss720.c
··· 714 714 /* 715 715 * Allocate parport interface 716 716 */ 717 - if (!(priv = kzalloc(sizeof(struct parport_uss720_private), GFP_KERNEL))) { 717 + priv = kzalloc(sizeof(struct parport_uss720_private), GFP_KERNEL); 718 + if (!priv) { 718 719 usb_put_dev(usbdev); 719 720 return -ENOMEM; 720 721 } ··· 724 723 kref_init(&priv->ref_count); 725 724 spin_lock_init(&priv->asynclock); 726 725 INIT_LIST_HEAD(&priv->asynclist); 727 - if (!(pp = parport_register_port(0, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &parport_uss720_ops))) { 726 + pp = parport_register_port(0, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &parport_uss720_ops); 727 + if (!pp) { 728 728 printk(KERN_WARNING "uss720: could not register parport\n"); 729 729 goto probe_abort; 730 730 }