diff options
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-core.c | 6 | ||||
-rw-r--r-- | drivers/ata/libata-scsi.c | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 407e7e15c252..794f327e398a 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -5948,11 +5948,7 @@ ata_probe_ent_alloc(struct device *dev, const struct ata_port_info *port) | |||
5948 | { | 5948 | { |
5949 | struct ata_probe_ent *probe_ent; | 5949 | struct ata_probe_ent *probe_ent; |
5950 | 5950 | ||
5951 | /* XXX - the following if can go away once all LLDs are managed */ | 5951 | probe_ent = devm_kzalloc(dev, sizeof(*probe_ent), GFP_KERNEL); |
5952 | if (!list_empty(&dev->devres_head)) | ||
5953 | probe_ent = devm_kzalloc(dev, sizeof(*probe_ent), GFP_KERNEL); | ||
5954 | else | ||
5955 | probe_ent = kzalloc(sizeof(*probe_ent), GFP_KERNEL); | ||
5956 | if (!probe_ent) { | 5952 | if (!probe_ent) { |
5957 | printk(KERN_ERR DRV_NAME "(%s): out of memory\n", | 5953 | printk(KERN_ERR DRV_NAME "(%s): out of memory\n", |
5958 | kobject_name(&(dev->kobj))); | 5954 | kobject_name(&(dev->kobj))); |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index d1bf1ca4f717..7bb782b5ce0c 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -3235,7 +3235,7 @@ struct ata_port *ata_sas_port_alloc(struct ata_host *host, | |||
3235 | 3235 | ||
3236 | ata_port_init(ap, host, ent, 0); | 3236 | ata_port_init(ap, host, ent, 0); |
3237 | ap->lock = shost->host_lock; | 3237 | ap->lock = shost->host_lock; |
3238 | kfree(ent); | 3238 | devm_kfree(host->dev, ent); |
3239 | return ap; | 3239 | return ap; |
3240 | } | 3240 | } |
3241 | EXPORT_SYMBOL_GPL(ata_sas_port_alloc); | 3241 | EXPORT_SYMBOL_GPL(ata_sas_port_alloc); |