bogus check in sg_add()

Olaf Hering olh at suse.de
Fri Feb 13 02:55:53 EST 2004


what is up with this check in ameslab? Still needed, what does it fix?


diff -purN linux-2.5/drivers/scsi/sg.c linuxppc64-2.5/drivers/scsi/sg.c
--- linux-2.5/drivers/scsi/sg.c 2004-02-06 08:21:23.000000000 +0000
+++ linuxppc64-2.5/drivers/scsi/sg.c    2004-02-10 08:37:26.000000000 +0000
@@ -1343,6 +1343,9 @@ sg_add(struct class_device *cl_dev)
        struct cdev * cdev = NULL;
        int k, error;

+       if (scsidp->type == 255)
+               return 0;
+
        disk = alloc_disk(1);
        if (!disk)
                return -ENOMEM;

--
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list