@@ -2065,11 +2065,9 @@ static void read_pipe_completion(struct urb *purb)
pipe_info = purb->context;
- if (!pipe_info) {
- dev_err(&purb->dev->dev, "no context!\n");
- return;
- }
+ if (!pipe_info)
+ goto report_failure;
+
dev = pipe_info->dev;
- if (!dev) {
- dev_err(&purb->dev->dev, "no context!\n");
- return;
- }
+ if (!dev)
+ goto report_failure;
+
status = purb->status;
@@ -2107,6 +2105,9 @@ static void read_pipe_completion(struct urb *purb)
dprintk(dev, 2, "%s :complete state 0\n", __func__);
}
return;
+
+report_failure:
+ dev_err(&purb->dev->dev, "no context!\n");
}
static int s2255_start_readpipe(struct s2255_dev *dev)