mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
scsi: osd_uld: remove an unneeded NULL check
We don't call the remove() function unless probe() succeeds so "oud" can't be NULL here. Plus, if it were NULL, we dereference it on the next line so it would crash anyway. [mkp: applied by hand] Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Boaz Harrosh <ooo@electrozaur.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
16a20b52d1
commit
03b1a06203
1 changed files with 3 additions and 4 deletions
|
@ -524,10 +524,9 @@ static int osd_remove(struct device *dev)
|
|||
struct scsi_device *scsi_device = to_scsi_device(dev);
|
||||
struct osd_uld_device *oud = dev_get_drvdata(dev);
|
||||
|
||||
if (!oud || (oud->od.scsi_device != scsi_device)) {
|
||||
OSD_ERR("Half cooked osd-device %p,%p || %p!=%p",
|
||||
dev, oud, oud ? oud->od.scsi_device : NULL,
|
||||
scsi_device);
|
||||
if (oud->od.scsi_device != scsi_device) {
|
||||
OSD_ERR("Half cooked osd-device %p, || %p!=%p",
|
||||
dev, oud->od.scsi_device, scsi_device);
|
||||
}
|
||||
|
||||
device_unregister(&oud->class_dev);
|
||||
|
|
Loading…
Add table
Reference in a new issue