Message ID | 558AE8D5.1020106@users.sourceforge.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 8bb173e..84c8565 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -336,9 +336,7 @@ static void scsi_host_dev_release(struct device *dev) } kfree(shost->shost_data); - - if (parent) - put_device(parent); + put_device(parent); kfree(shost); } diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 1ac38e7..9ed5391 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -425,9 +425,7 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work) kfree(sdev->vpd_pg80); kfree(sdev->inquiry); kfree(sdev); - - if (parent) - put_device(parent); + put_device(parent); } static void scsi_device_dev_release(struct device *dev)