[PATCH] ppc64 iseries: can't remove viocd module when no cdroms
Stephen Rothwell
sfr at canb.auug.org.au
Tue Feb 1 15:59:01 EST 2005
Hi Andrew,
This patch 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: Stephen Rothwell <sfr at canb.auug.org.au>
--
Cheers,
Stephen Rothwell sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN linus-bk/drivers/cdrom/viocd.c linus-bk.viocd.1/drivers/cdrom/viocd.c
--- linus-bk/drivers/cdrom/viocd.c 2004-11-16 16:05:11.000000000 +1100
+++ linus-bk.viocd.1/drivers/cdrom/viocd.c 2005-02-01 15:52:03.000000000 +1100
@@ -765,8 +765,6 @@
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 @@
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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050201/2b951bc5/attachment.pgp
More information about the Linuxppc64-dev
mailing list