mirror of
https://github.com/torvalds/linux.git
synced 2024-11-19 18:41:48 +00:00
dm9000: NULL dereferences on error in probe()
The dm9000_release_board() function is called with NULL ->data_req and ->addr_req pointers if dm9000_probe() fails. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
188b1210f3
commit
a5536e1094
@ -817,9 +817,11 @@ dm9000_release_board(struct platform_device *pdev, struct board_info *db)
|
||||
|
||||
/* release the resources */
|
||||
|
||||
if (db->data_req)
|
||||
release_resource(db->data_req);
|
||||
kfree(db->data_req);
|
||||
|
||||
if (db->addr_req)
|
||||
release_resource(db->addr_req);
|
||||
kfree(db->addr_req);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user