Skip to content

Commit

Permalink
mailbox: platform-mhu: Remove redundant dev_err()
Browse files Browse the repository at this point in the history
There is no need to call the dev_err() function directly to print a custom
message when handling an error from platform_get_irq() function as
it is going to display an appropriate error message in case of a failure.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
  • Loading branch information
Ruan Jinjie authored and Jassi Brar committed Sep 5, 2023
1 parent ad495a5 commit 65d9aa3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mailbox/platform_mhu.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,8 @@ static int platform_mhu_probe(struct platform_device *pdev)
for (i = 0; i < MHU_CHANS; i++) {
mhu->chan[i].con_priv = &mhu->mlink[i];
mhu->mlink[i].irq = platform_get_irq(pdev, i);
if (mhu->mlink[i].irq < 0) {
dev_err(dev, "failed to get irq%d\n", i);
if (mhu->mlink[i].irq < 0)
return mhu->mlink[i].irq;
}
mhu->mlink[i].rx_reg = mhu->base + platform_mhu_reg[i];
mhu->mlink[i].tx_reg = mhu->mlink[i].rx_reg + TX_REG_OFFSET;
}
Expand Down

0 comments on commit 65d9aa3

Please sign in to comment.