]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] s390: dasd driver
authorHorst Hummel <horst.hummel@de.ibm.com>
Sat, 9 Oct 2004 08:04:26 +0000 (01:04 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 9 Oct 2004 08:04:26 +0000 (01:04 -0700)
dasd driver changes:
 - Free memory returned by read_conf_data.
 - Add warning message if use_diag is specified with a non-CMS
   formatted device.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/s390/block/dasd_diag.c
drivers/s390/block/dasd_eckd.c

index cc79775b09f072b75d3575a3e5d15f487768e3da..deaecd080203405d281ae83e19b261038e6a29a3 100644 (file)
@@ -6,7 +6,7 @@
  * Bugreports.to..: <Linux390@de.ibm.com>
  * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
  *
- * $Revision: 1.37 $
+ * $Revision: 1.38 $
  */
 
 #include <linux/config.h>
@@ -304,8 +304,11 @@ dasd_diag_check_device(struct dasd_device *device)
                            (device->bp_block >> 10),
                            (device->blocks << device->s2b_shift) >> 1);
                rc = 0;
-       } else
+       } else {
+               DEV_MESSAGE(KERN_WARNING, device, "%s",
+                           "volume has incompatible disk layout");
                rc = -EMEDIUMTYPE;
+       }
        free_page((long) label);
        return rc;
 }
index 48e2943fb9126475e002775bff4065b5f94501bd..56f471c23a51b199f9862280341edb06b9ffdc32 100644 (file)
@@ -7,7 +7,7 @@
  * Bugreports.to..: <Linux390@de.ibm.com>
  * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
  *
- * $Revision: 1.59 $
+ * $Revision: 1.61 $
  */
 
 #include <linux/config.h>
@@ -505,11 +505,13 @@ dasd_eckd_check_characteristics(struct dasd_device *device)
                        "sizes of configuration data mismatch"
                        "%d (read) vs %ld (expected)",
                        conf_len, sizeof (struct dasd_eckd_confdata));
+
+               kfree(conf_data); /* allocated by read_conf_data() */
                return 0;       /* no errror */
        }
        memcpy(&private->conf_data, conf_data,
               sizeof (struct dasd_eckd_confdata));
-
+       kfree(conf_data); /* allocated by read_conf_data() */
        return 0;
 }