From 44cff08b282307709863cb440da5a271fd93a88a Mon Sep 17 00:00:00 2001
From: Andreas Beckmann <anbe@debian.org>
Date: Wed, 14 Aug 2024 09:42:29 +0200
Subject: [PATCH] remove duplicate rdsk->rdsk_disk allocation

---
 module/rapiddisk.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/module/rapiddisk.c b/module/rapiddisk.c
index 86a5205..6560aeb 100644
--- a/module/rapiddisk.c
+++ b/module/rapiddisk.c
@@ -807,13 +807,6 @@ static int attach_device(unsigned long num, unsigned long long size)
 	blk_queue_make_request(rdsk->rdsk_queue, rdsk_make_request);
 #endif
 #endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
-	disk = rdsk->rdsk_disk = blk_alloc_disk(NUMA_NO_NODE);
-#else
-	disk = rdsk->rdsk_disk = alloc_disk(1);
-#endif
-	if (!disk)
-		goto out_free_queue;
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
 	disk = rdsk->rdsk_disk = blk_alloc_disk(NUMA_NO_NODE);
 #else
-- 
2.39.5

