drivers/staging/media/atomisp/pci/atomisp2/./atomisp_ioctl.c:560:5-8: Unneeded variable: "ret". Return "0" on line 577 Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci CC: Alan Cox <alan@xxxxxxxxxxxxxxx> Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx> --- Please take the patch only if it's a positive warning. Thanks! atomisp_ioctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/staging/media/atomisp/pci/atomisp2/./atomisp_ioctl.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/./atomisp_ioctl.c @@ -557,8 +557,6 @@ const struct atomisp_format_bridge *atom static int atomisp_querycap(struct file *file, void *fh, struct v4l2_capability *cap) { - int ret = 0; - memset(cap, 0, sizeof(struct v4l2_capability)); WARN_ON(sizeof(DRIVER) > sizeof(cap->driver) || @@ -574,7 +572,7 @@ static int atomisp_querycap(struct file cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_OUTPUT; cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; - return ret; + return 0; } /*