summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/davicom/dm9000.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c
index 13723c96d1a2..23084fb2090e 100644
--- a/drivers/net/ethernet/davicom/dm9000.c
+++ b/drivers/net/ethernet/davicom/dm9000.c
@@ -817,10 +817,12 @@ dm9000_release_board(struct platform_device *pdev, struct board_info *db)
/* release the resources */
- release_resource(db->data_req);
+ if (db->data_req)
+ release_resource(db->data_req);
kfree(db->data_req);
- release_resource(db->addr_req);
+ if (db->addr_req)
+ release_resource(db->addr_req);
kfree(db->addr_req);
}