[PATCH 339/641] Staging: hv: warn the world of a bug in the release function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All device release functions need to do something, if not, it's a bug.
By merely providing an "empty" release function, it gets the kernel to
shut up, but that's not solving the problem at all.  Stick a big fat
WARN_ON(1); in there to get people's attention.


Cc: Hank Janssen <hjanssen@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
 drivers/staging/hv/vmbus_drv.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 4462d5b..cc81ffd 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -965,6 +965,11 @@ Desc:	Final callback release of the vmbus root device
 static void vmbus_bus_release(struct device *device)
 {
 	DPRINT_ENTER(VMBUS_DRV);
+	/* FIXME */
+	/* Empty release functions are a bug, or a major sign
+	 * of a problem design, this MUST BE FIXED! */
+	dev_err(device, "%s needs to be fixed!\n", __func__);
+	WARN_ON(1);
 	DPRINT_EXIT(VMBUS_DRV);
 }
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux