LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Roy Pledge <roy.pledge@nxp.com>
To: devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org
Cc: arnd@arndb.de, gregkh@linuxfoundation.org, horia.geanta@nxp.com,
	linux-kernel@vger.kernel.org, leoyang.li@nxp.com,
	stuyoder@gmail.com, catalin.marinas@arm.com,
	robin.murphy@arm.com, Roy Pledge <roy.pledge@nxp.com>,
	laurentiu.tudor@nxp.com
Subject: [PATCH v4 2/4] drivers/staging/fsl-mc: Fix DPIO error path issue
Date: Tue, 27 Mar 2018 14:13:32 -0400	[thread overview]
Message-ID: <1522174414-30380-3-git-send-email-roy.pledge@nxp.com> (raw)
In-Reply-To: <1522174414-30380-1-git-send-email-roy.pledge@nxp.com>

Remove unneeded call to dev_set_drvdata(dev, NULL) since the device
will be deallocated in any case.

Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
---
 drivers/staging/fsl-mc/bus/dpio/dpio-driver.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c
index ffcbd5a..9e12576 100644
--- a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c
+++ b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c
@@ -101,7 +101,7 @@ static int dpaa2_dpio_probe(struct fsl_mc_device *dpio_dev)
 	if (err) {
 		dev_dbg(dev, "MC portal allocation failed\n");
 		err = -EPROBE_DEFER;
-		goto err_mcportal;
+		goto err_priv_alloc;
 	}
 
 	err = dpio_open(dpio_dev->mc_io, 0, dpio_dev->obj_desc.id,
@@ -196,8 +196,6 @@ static int dpaa2_dpio_probe(struct fsl_mc_device *dpio_dev)
 	dpio_close(dpio_dev->mc_io, 0, dpio_dev->mc_handle);
 err_open:
 	fsl_mc_portal_free(dpio_dev->mc_io);
-err_mcportal:
-	dev_set_drvdata(dev, NULL);
 err_priv_alloc:
 	return err;
 }
@@ -241,8 +239,6 @@ static int dpaa2_dpio_remove(struct fsl_mc_device *dpio_dev)
 
 	fsl_mc_portal_free(dpio_dev->mc_io);
 
-	dev_set_drvdata(dev, NULL);
-
 	return 0;
 
 err_open:
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2018-03-27 18:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27 18:13 [PATCH v4 0/4] drives/soc/fsl: Move DPIO driver out of staging Roy Pledge
2018-03-27 18:13 ` [PATCH v4 1/4] drivers/staging/fsl-mc: Use devm_memremap/devm_ioremap for DPIO Roy Pledge
2018-03-27 18:13 ` Roy Pledge [this message]
2018-03-27 18:13 ` [PATCH v4 3/4] staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl Roy Pledge
2018-04-27 14:59   ` Greg KH
2018-03-27 18:13 ` [PATCH v4 4/4] drivers/staging: Remove fsl-mc driver from staging Roy Pledge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1522174414-30380-3-git-send-email-roy.pledge@nxp.com \
    --to=roy.pledge@nxp.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=horia.geanta@nxp.com \
    --cc=laurentiu.tudor@nxp.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=stuyoder@gmail.com \
    --subject='Re: [PATCH v4 2/4] drivers/staging/fsl-mc: Fix DPIO error path issue' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).