Messages in this thread | | | Date | Mon, 28 Jan 2002 19:05:51 -0500 | From | Pete Zaitcev <> | Subject | Re: Encountered a Null Pointer Problem on the SCSI Layer |
| |
> From: Jesper Juhl <jju@dif.dk> > Date: Tue, 29 Jan 2002 00:57:02 +0100
> > - if (!dpnt) > > + if (!dpnt->device) > > return NULL; /* No such device */ > > Maybe I don't understand this right, but shouldn't that be > > if (!dpnt || !dpnt->device) > return NULL; /* No such device */
In both cases, the code is like this:
dpnt = &rscsi_disks[dev_nr]; if (!dpnt->device) return NULL;
So, it is unlikely that dpnt would be zero. It could be if rscsi_disks were NULL, and in such case whole logics is toast.
-- Pete - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |