Browse Source

Bugfix: nanofury: Check if mcp2210_device exists before trying to power it off

Luke Dashjr 12 years ago
parent
commit
78e5ab5ca2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      driver-nanofury.c

+ 2 - 1
driver-nanofury.c

@@ -282,7 +282,8 @@ void nanofury_shutdown(struct thr_info * const thr)
 {
 {
 	struct mcp2210_device * const mcp = thr->cgpu_data;
 	struct mcp2210_device * const mcp = thr->cgpu_data;
 	
 	
-	nanofury_device_off(mcp);
+	if (mcp)
+		nanofury_device_off(mcp);
 }
 }
 
 
 struct device_drv nanofury_drv = {
 struct device_drv nanofury_drv = {