mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion
devm_regulator_get_enable_optional() function returns 0 on success, so
use it for the check if function succeeded instead of the -ENODEV value.
Fixes: 429e870636 ("drm/meson: dw-hdmi: Use devm_regulator_*get_enable*()")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
[narmstrong: s/succeeded/succeeded/ in commit message]
Link: https://patchwork.freedesktop.org/patch/msgid/20230109220033.31202-1-m.szyprowski@samsung.com
			
			
This commit is contained in:
		
							parent
							
								
									2349183d32
								
							
						
					
					
						commit
						67d0a30128
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -718,7 +718,7 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
 | 
				
			||||||
	dw_plat_data = &meson_dw_hdmi->dw_plat_data;
 | 
						dw_plat_data = &meson_dw_hdmi->dw_plat_data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ret = devm_regulator_get_enable_optional(dev, "hdmi");
 | 
						ret = devm_regulator_get_enable_optional(dev, "hdmi");
 | 
				
			||||||
	if (ret != -ENODEV)
 | 
						if (ret < 0)
 | 
				
			||||||
		return ret;
 | 
							return ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	meson_dw_hdmi->hdmitx_apb = devm_reset_control_get_exclusive(dev,
 | 
						meson_dw_hdmi->hdmitx_apb = devm_reset_control_get_exclusive(dev,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue