> > - 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/