From: Hans de Goede Date: Mon, 29 Aug 2022 10:37:11 +0000 (+0200) Subject: media: atomisp: Simplify v4l2_fh_open() error handling X-Git-Tag: v6.1-rc5~124^2~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba6856aab1a7edebf1a27c0b6bffaa8a6ea80de7;p=platform%2Fkernel%2Flinux-starfive.git media: atomisp: Simplify v4l2_fh_open() error handling v4l2_fh_open() can only fail with -ENOMEM and as a generic rule drivers do not log their own errors for -ENOMEM since the kernel will already have complained loudly about this before the -ENOMEM return. Remove the unnecessary error logging from atomisp_open(). Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c index 61571f3..fa37def 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_fops.c +++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c @@ -708,12 +708,8 @@ static int atomisp_open(struct file *file) dev_dbg(isp->dev, "open device %s\n", vdev->name); ret = v4l2_fh_open(file); - if (ret) { - dev_err(isp->dev, - "%s: v4l2_fh_open() returned error %d\n", - __func__, ret); + if (ret) return ret; - } rt_mutex_lock(&isp->mutex);