Commit d7cf43ac authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

[PATCH] ppc64 iseries: can't remove viocd module when no cdroms

This fixes a bug where attempting to remove the viocd module when no
virtual cdroms where actually present would cause an oops.  The driver
was not completing its initialisation in this case.
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 20f865ba
......@@ -765,8 +765,6 @@ static int __init viocd_init(void)
vio_setHandler(viomajorsubtype_cdio, vio_handle_cd_event);
get_viocd_info();
if (viocd_numdev == 0)
goto out_undo_vio;
spin_lock_init(&viocd_reqlock);
......@@ -786,7 +784,6 @@ static int __init viocd_init(void)
dma_free_coherent(iSeries_vio_dev,
sizeof(*viocd_unitinfo) * VIOCD_MAX_CD,
viocd_unitinfo, unitinfo_dmaaddr);
out_undo_vio:
vio_clearHandler(viomajorsubtype_cdio);
viopath_close(viopath_hostLp, viomajorsubtype_cdio, MAX_CD_REQ + 2);
out_unregister:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment