]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/md/dm-stripe.c
dm stripe: fix init failure
[linux-2.6-omap-h63xx.git] / drivers / md / dm-stripe.c
index b745d8ac625b5ffd6730f585e95fec2081cf8429..9e4ef88d421e499dfb05e1697593bcbf82fefe38 100644 (file)
@@ -4,7 +4,7 @@
  * This file is released under the GPL.
  */
 
-#include "dm.h"
+#include <linux/device-mapper.h>
 
 #include <linux/module.h>
 #include <linux/init.h>
@@ -60,8 +60,8 @@ static inline struct stripe_c *alloc_context(unsigned int stripes)
 {
        size_t len;
 
-       if (array_too_big(sizeof(struct stripe_c), sizeof(struct stripe),
-                         stripes))
+       if (dm_array_too_big(sizeof(struct stripe_c), sizeof(struct stripe),
+                            stripes))
                return NULL;
 
        len = sizeof(struct stripe_c) + (sizeof(struct stripe) * stripes);
@@ -320,8 +320,10 @@ int __init dm_stripe_init(void)
        int r;
 
        r = dm_register_target(&stripe_target);
-       if (r < 0)
+       if (r < 0) {
                DMWARN("target registration failed");
+               return r;
+       }
 
        kstriped = create_singlethread_workqueue("kstriped");
        if (!kstriped) {