From: Laurent Pinchart Date: Mon, 6 Jul 2020 18:36:41 +0000 (+0200) Subject: media: ti-vpe: cal: Remove unneeded phy->sensor NULL check X-Git-Tag: v5.9-rc1~94^2~95 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56d1d67468ae195613c374e1e42fac85d22f24e5;p=thirdparty%2Fkernel%2Flinux.git media: ti-vpe: cal: Remove unneeded phy->sensor NULL check The phy->sensor NULL check in cal_camerarx_get_external_rate() is not needed, as the V4L2 video devices are only registered when the sensor is bound. Remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c index 8b1815bbf1a76..ade76739de47f 100644 --- a/drivers/media/platform/ti-vpe/cal.c +++ b/drivers/media/platform/ti-vpe/cal.c @@ -485,9 +485,6 @@ static s64 cal_camerarx_get_external_rate(struct cal_camerarx *phy) struct v4l2_ctrl *ctrl; s64 rate; - if (!phy->sensor) - return -ENODEV; - ctrl = v4l2_ctrl_find(phy->sensor->ctrl_handler, V4L2_CID_PIXEL_RATE); if (!ctrl) { phy_err(phy, "no pixel rate control in subdev: %s\n",