staging: most: hdm-usb: remove unnecessary status assignment
authorChristian Gromm <christian.gromm@microchip.com>
Fri, 19 Aug 2016 09:13:00 +0000 (11:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2016 14:53:57 +0000 (16:53 +0200)
The USB completion callbacks set the status field of an MBO object before
scheduling the clear_work. This patch removes this redundant assignment as
the work_struct does the same for all MBOs.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/hdm-usb/hdm_usb.c

index 453b641684d426d81648e85572aaaadc2c3a8437..f44f27e647ea43b71a85bd3a6778d3af3ed8ffd9 100644 (file)
@@ -412,7 +412,6 @@ static void hdm_write_completion(struct urb *urb)
                        dev_warn(dev, "Broken OUT pipe detected\n");
                        mdev->is_channel_healthy[channel] = false;
                        spin_unlock_irqrestore(lock, flags);
-                       mbo->status = MBO_E_INVAL;
                        mdev->clear_work[channel].pipe = urb->pipe;
                        schedule_work(&mdev->clear_work[channel].ws);
                        return;
@@ -570,7 +569,6 @@ static void hdm_read_completion(struct urb *urb)
                        dev_warn(dev, "Broken IN pipe detected\n");
                        mdev->is_channel_healthy[channel] = false;
                        spin_unlock_irqrestore(lock, flags);
-                       mbo->status = MBO_E_INVAL;
                        mdev->clear_work[channel].pipe = urb->pipe;
                        schedule_work(&mdev->clear_work[channel].ws);
                        return;