path: root/common/blspec.c
diff options
authorSascha Hauer <>2015-09-10 12:04:02 +0200
committerSascha Hauer <>2015-09-23 17:12:44 +0200
commit7e44c8495ace5dc2dfd9f183e7956fca3661a614 (patch)
tree28aec094a44c002d20629bedb5ff5eec3cc398ae /common/blspec.c
parent9d54b6f6b6c42b7078ba8619444089507a0563f3 (diff)
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 <>
Diffstat (limited to 'common/blspec.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/common/blspec.c b/common/blspec.c
index ab18602..d5ddb4f 100644
--- a/common/blspec.c
+++ b/common/blspec.c
@@ -646,7 +646,7 @@ static int blspec_append_root(struct blspec_entry *entry)
rootarg = path_get_linux_rootarg(entry->rootpath);
if (IS_ERR(rootarg)) {
pr_err("Getting root argument for %s failed with: %s\n",
- entry->rootpath, strerror(-PTR_ERR(rootarg)));
+ entry->rootpath, strerrorp(rootarg));
return PTR_ERR(rootarg);