Skip to contentSkip to conversation

media-device.h: fix compiler warning

PATCH In review Hans Verkuil 2 participants 2 messages Feb 26, 2016 – Mar 2, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media-device.h: fix compiler warning

Fix these compiler warnings:

media-git/include/media/media-device.h: In function 'media_device_pci_init':
media-git/include/media/media-device.h:610:9: warning: 'return' with a value, in function returning void

  return NULL;
         ^
media-git/include/media/media-device.h: In function '__media_device_usb_init':
media-git/include/media/media-device.h:618:9: warning: 'return' with a value, in function returning void
  return NULL;
         ^
include/media/media-device.h +0 -2
index 49dda6c..44012fe 100644
@@ -607,7 +607,6 @@ static inline void media_device_pci_init(struct media_device *mdev,
 					 struct pci_dev *pci_dev,
 					 char *name)
 {
-	return NULL;
 }
 
 static inline void __media_device_usb_init(struct media_device *mdev,
@@ -615,7 +614,6 @@ static inline void __media_device_usb_init(struct media_device *mdev,
 					   char *board_name,
 					   char *driver_name)
 {
-	return NULL;
 }
 
 #endif /* CONFIG_MEDIA_CONTROLLER */
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hi Hans,

Thank you for the patch.

Quoted 5 lines · On Friday 26 February 2016 08:44:35 Hans Verkuil wrote:

Fix these compiler warnings:

media-git/include/media/media-device.h: In function 'media_device_pci_init':
media-git/include/media/media-device.h:610:9: warning: 'return' with a value, in function returning void return NULL;

Quoted 7 lines
         ^
media-git/include/media/media-device.h: In function
'__media_device_usb_init': media-git/include/media/media-device.h:618:9:
warning: 'return' with a value, in function returning void return NULL;
         ^
Quoted 20 lines
include/media/media-device.h +0 -2
index 49dda6c..44012fe 100644
@@ -607,7 +607,6 @@ static inline void media_device_pci_init(struct
 media_device *mdev, struct pci_dev *pci_dev,
 					 char *name)
 {
-	return NULL;
 }
 
 static inline void __media_device_usb_init(struct media_device *mdev,
@@ -615,7 +614,6 @@ static inline void __media_device_usb_init(struct
 media_device *mdev, char *board_name,
 					   char *driver_name)
 {
-	return NULL;
 }
 
 #endif /* CONFIG_MEDIA_CONTROLLER */
Signature · 3 lines
Regards,

Laurent Pinchart