diff mbox

drm/mediatek/mtk_mipi_tx: checking the wrong variable

Message ID 20160701135934.GA15723@mwanda (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter July 1, 2016, 1:59 p.m. UTC
We should be checking "phy_provider" here not "phy".

Fixes: 2e54c14e310f ('drm/mediatek: Add DSI sub driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Matthias Brugger July 2, 2016, 4:44 p.m. UTC | #1
On 07/01/2016 03:59 PM, Dan Carpenter wrote:
> We should be checking "phy_provider" here not "phy".
>
> Fixes: 2e54c14e310f ('drm/mediatek: Add DSI sub driver')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

> diff --git a/drivers/gpu/drm/mediatek/mtk_mipi_tx.c b/drivers/gpu/drm/mediatek/mtk_mipi_tx.c
> index cf8f38d..1c366f8 100644
> --- a/drivers/gpu/drm/mediatek/mtk_mipi_tx.c
> +++ b/drivers/gpu/drm/mediatek/mtk_mipi_tx.c
> @@ -431,7 +431,7 @@ static int mtk_mipi_tx_probe(struct platform_device *pdev)
>  	phy_set_drvdata(phy, mipi_tx);
>
>  	phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
> -	if (IS_ERR(phy)) {
> +	if (IS_ERR(phy_provider)) {
>  		ret = PTR_ERR(phy_provider);
>  		return ret;
>  	}
>
Daniel Vetter July 12, 2016, 12:47 p.m. UTC | #2
On Sat, Jul 02, 2016 at 06:44:13PM +0200, Matthias Brugger wrote:
> 
> 
> On 07/01/2016 03:59 PM, Dan Carpenter wrote:
> > We should be checking "phy_provider" here not "phy".
> > 
> > Fixes: 2e54c14e310f ('drm/mediatek: Add DSI sub driver')
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> 
> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

Applied to drm-misc, thanks.
-Daniel

> 
> > diff --git a/drivers/gpu/drm/mediatek/mtk_mipi_tx.c b/drivers/gpu/drm/mediatek/mtk_mipi_tx.c
> > index cf8f38d..1c366f8 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_mipi_tx.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_mipi_tx.c
> > @@ -431,7 +431,7 @@ static int mtk_mipi_tx_probe(struct platform_device *pdev)
> >  	phy_set_drvdata(phy, mipi_tx);
> > 
> >  	phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
> > -	if (IS_ERR(phy)) {
> > +	if (IS_ERR(phy_provider)) {
> >  		ret = PTR_ERR(phy_provider);
> >  		return ret;
> >  	}
> > 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/mediatek/mtk_mipi_tx.c b/drivers/gpu/drm/mediatek/mtk_mipi_tx.c
index cf8f38d..1c366f8 100644
--- a/drivers/gpu/drm/mediatek/mtk_mipi_tx.c
+++ b/drivers/gpu/drm/mediatek/mtk_mipi_tx.c
@@ -431,7 +431,7 @@  static int mtk_mipi_tx_probe(struct platform_device *pdev)
 	phy_set_drvdata(phy, mipi_tx);
 
 	phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
-	if (IS_ERR(phy)) {
+	if (IS_ERR(phy_provider)) {
 		ret = PTR_ERR(phy_provider);
 		return ret;
 	}