diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-09-10 12:04:02 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-09-23 17:12:44 +0200 |
commit | 7e44c8495ace5dc2dfd9f183e7956fca3661a614 (patch) | |
tree | 28aec094a44c002d20629bedb5ff5eec3cc398ae /fs/ubifs/ubifs.c | |
parent | 9d54b6f6b6c42b7078ba8619444089507a0563f3 (diff) | |
download | barebox-7e44c8495ace5dc2dfd9f183e7956fca3661a614.tar.gz barebox-7e44c8495ace5dc2dfd9f183e7956fca3661a614.tar.xz |
introduce strerrorp
putting an error pointer into strerror can be a bit confusing since
strerror takes a positive error code but PTR_ERR returns a negative
number, so we have to do strerror(-PTR_ERR(errp)). Some places got
this wrong already, so introduce a strerrorp function which directly
takes an error pointer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/ubifs/ubifs.c')
-rw-r--r-- | fs/ubifs/ubifs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c index a9189f76b5..4368203bad 100644 --- a/fs/ubifs/ubifs.c +++ b/fs/ubifs/ubifs.c @@ -622,7 +622,7 @@ static int ubifs_probe(struct device_d *dev) priv->ubi = ubi_open_volume_cdev(priv->cdev, UBI_READONLY); if (IS_ERR(priv->ubi)) { dev_err(dev, "failed to open ubi volume: %s\n", - strerror(-PTR_ERR(priv->ubi))); + strerrorp(priv->ubi)); ret = PTR_ERR(priv->ubi); goto err_free; } |