Skip to content

Commit 517f088

Browse files
tq-steinamchehab
authored andcommitted
media: amphion: use dev_err_probe
This simplifies the code and silences -517 error messages. Also the reason is listed in /sys/kernel/debug/devices_deferred. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: ming_qian <ming.qian@nxp.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
1 parent bf4c985 commit 517f088

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

drivers/media/platform/amphion/vpu_mbox.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ static int vpu_mbox_request_channel(struct device *dev, struct vpu_mbox *mbox)
4646
cl->rx_callback = vpu_mbox_rx_callback;
4747

4848
ch = mbox_request_channel_byname(cl, mbox->name);
49-
if (IS_ERR(ch)) {
50-
dev_err(dev, "Failed to request mbox chan %s, ret : %ld\n",
51-
mbox->name, PTR_ERR(ch));
52-
return PTR_ERR(ch);
53-
}
49+
if (IS_ERR(ch))
50+
return dev_err_probe(dev, PTR_ERR(ch),
51+
"Failed to request mbox chan %s\n",
52+
mbox->name);
5453

5554
mbox->ch = ch;
5655
return 0;

0 commit comments

Comments
 (0)