]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] s390: 3270 device driver.
authorAndrew Morton <akpm@osdl.org>
Thu, 22 Apr 2004 06:34:58 +0000 (23:34 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 22 Apr 2004 06:34:58 +0000 (23:34 -0700)
From: Martin Schwidefsky <schwidefsky@de.ibm.com>

3270 device driver changes:
 - Add NULL pointer checks.

drivers/s390/char/raw3270.c

index ef0f996fa79891ad526fbf9d7ffaf81a6342fb1d..ecba07756cbb81bb41d7fc023b498e97423b289d 100644 (file)
@@ -381,6 +381,8 @@ raw3270_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
                        return; /* Sucessfully restarted. */
                break;
        case RAW3270_IO_STOP:
+               if (!rq)
+                       break;
                raw3270_halt_io_nolock(rp, rq);
                rq->rc = -EIO;
                break;
@@ -881,7 +883,7 @@ raw3270_activate_view(struct raw3270_view *view)
                if (rc) {
                        /* Didn't work. Try to reactivate the old view. */
                        rp->view = oldview;
-                       if (oldview->fn->activate(oldview) != 0) {
+                       if (!oldview || oldview->fn->activate(oldview) != 0) {
                                /* Didn't work as well. Try any other view. */
                                list_for_each_entry(nv, &rp->view_list, list)
                                        if (nv != view && nv != oldview) {