diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2016-07-22 14:13:41 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-07-22 15:25:18 -0700 |
commit | 2d6f1c29988c0f5b51949bb674fe9dcdb923c4a6 (patch) | |
tree | 8a7c739bf4d8890810d7d558b659f6cdbf1514ad /drivers/staging/greybus/bootrom.c | |
parent | cc90d6fce858cea167102380e57a63af2f75ec8b (diff) | |
download | linux-2d6f1c29988c0f5b51949bb674fe9dcdb923c4a6.tar.bz2 |
greybus: bootrom: Don't print duplicate error messages
On failing to find a firmware image, we get these today:
bootrom 1-3.3.1: Firmware request for ara_00000126_00001001_fffe0001_ffe5001a_s2l.tftf has failed : -12
bootrom 1-3.3.1: gb_bootrom_firmware_size_request: failed to download firmware (-12)
Which are more or less duplicate, as they print error for the same root
cause.
With this patch this is all we get now:
bootrom 1-3.3.1: failed to download ara_00000126_00001001_fffe0001_ffe5001a_s2l.tftf firmware (-12)
Reported-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/bootrom.c')
-rw-r--r-- | drivers/staging/greybus/bootrom.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c index d16f13e0cb8d..c5b397145145 100644 --- a/drivers/staging/greybus/bootrom.c +++ b/drivers/staging/greybus/bootrom.c @@ -171,10 +171,11 @@ static int download_firmware(struct gb_bootrom *bootrom, u8 stage) rc = request_firmware(&bootrom->fw, firmware_name, &connection->bundle->dev); - if (rc) - dev_err(&connection->bundle->dev, - "Firmware request for %s has failed : %d", + if (rc) { + dev_err(&connection->bundle->dev, "failed to download %s firmware (%d)\n", firmware_name, rc); + } + return rc; } @@ -200,11 +201,8 @@ static int gb_bootrom_firmware_size_request(struct gb_operation *op) mutex_lock(&bootrom->mutex); ret = download_firmware(bootrom, size_request->stage); - if (ret) { - dev_err(dev, "%s: failed to download firmware (%d)\n", __func__, - ret); + if (ret) goto unlock; - } if (!gb_operation_response_alloc(op, sizeof(*size_response), GFP_KERNEL)) { |