mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	coresight: tmc: Cleanup power management
Drop the power only if we were successful in probing the device. Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
		
							parent
							
								
									2390d45864
								
							
						
					
					
						commit
						263556950f
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -432,8 +432,6 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id) | ||||||
| 		drvdata->size = readl_relaxed(drvdata->base + TMC_RSZ) * 4; | 		drvdata->size = readl_relaxed(drvdata->base + TMC_RSZ) * 4; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	pm_runtime_put(&adev->dev); |  | ||||||
| 
 |  | ||||||
| 	desc.pdata = pdata; | 	desc.pdata = pdata; | ||||||
| 	desc.dev = dev; | 	desc.dev = dev; | ||||||
| 	desc.groups = coresight_tmc_groups; | 	desc.groups = coresight_tmc_groups; | ||||||
|  | @ -476,6 +474,8 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id) | ||||||
| 	ret = misc_register(&drvdata->miscdev); | 	ret = misc_register(&drvdata->miscdev); | ||||||
| 	if (ret) | 	if (ret) | ||||||
| 		coresight_unregister(drvdata->csdev); | 		coresight_unregister(drvdata->csdev); | ||||||
|  | 	else | ||||||
|  | 		pm_runtime_put(&adev->dev); | ||||||
| out: | out: | ||||||
| 	return ret; | 	return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Suzuki K Poulose
						Suzuki K Poulose