media: uvcvideo: Remove duplicate assignments to pointer dma_dev
Subsystems (2)
PATCH v2 1/1 media: uvcvideo: Remove duplicate assignments to pointer dma_dev
Remove redundant assignments to pointer dma_dev.
Addresses-Coverity-ID: 1501703 ("Evaluation order violation")
Addresses-Coverity-ID: 1501692 ("Evaluation order violation")
---
Changes in v2:
- Remove another redundant assignment in function uvc_free_urb_buffers().
drivers/media/usb/uvc/uvc_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/usb/uvc/uvc_video.c +2 -2
@@ -1105,7 +1105,7 @@ static inline struct device *stream_to_dmadev(struct uvc_streaming *stream)static void uvc_urb_dma_sync (struct uvc_urb *uvc_urb,bool for_device) { -struct device *dma_dev = dma_dev =stream_to_dmadev (uvc_urb->stream); +struct device *dma_dev =stream_to_dmadev (uvc_urb->stream);if (for_device) { dma_sync_sgtable_for_device(dma_dev, uvc_urb->sgt,
@@ -1586,7 +1586,7 @@ static void uvc_video_complete(struct urb *urb)*/ static void uvc_free_urb_buffers (struct uvc_streaming *stream) { -struct device *dma_dev = dma_dev =stream_to_dmadev (stream); +struct device *dma_dev =stream_to_dmadev (stream);struct uvc_urb *uvc_urb;for_each_uvc_urb (uvc_urb, stream) {
Signature · 1 line
2.27.0
Laurent Pinchart
maintainerHi Gustavo,
Thank you for the patch.
Quoted 6 lines · Gustavo A. R. Silva
Remove redundant assignments to pointer
dma_dev.Fixes fdcd02a641e2 ("media: uvcvideo: Use dma_alloc_noncontiguos API")Addresses-Coverity-ID: 1501703 ("Evaluation order violation")
Addresses-Coverity-ID: 1501692 ("Evaluation order violation")Signed-off-by Gustavo A. R. Silva <[email protected]>
Colin King has already submitted the same patch ("[PATCH][next][V2]
media: uvcvideo: remove duplicated dma_dev assignments"). As they're identical, I can only decide to use the first patch that reached my mailbox.
Quoted 30 lines
---
Changes in v2:
- Remove another redundant assignment in functionuvc_free_urb_buffers().drivers/media/usb/uvc/uvc_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/media/usb/uvc/uvc_video.c +2
-2@@ -1105,7 +1105,7 @@ static inline struct device *stream_to_dmadev(struct uvc_streaming *stream)static void uvc_urb_dma_sync (struct uvc_urb *uvc_urb,bool for_device) { -struct device *dma_dev = dma_dev =stream_to_dmadev (uvc_urb->stream); +struct device *dma_dev =stream_to_dmadev (uvc_urb->stream);if (for_device) { dma_sync_sgtable_for_device(dma_dev, uvc_urb->sgt,@@ -1586,7 +1586,7 @@ static void uvc_video_complete(struct urb *urb)*/ static void uvc_free_urb_buffers (struct uvc_streaming *stream) { -struct device *dma_dev = dma_dev =stream_to_dmadev (stream); +struct device *dma_dev =stream_to_dmadev (stream);struct uvc_urb *uvc_urb;for_each_uvc_urb (uvc_urb, stream) {
Signature · 3 lines
Regards, Laurent Pinchart