Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: Make checking the scsi_device_get() return value mandatory

Now that all scsi_device_get() callers check the return value of this
function, make checking that return value mandatory.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
ed12e031 c02465fa

+1 -1
+1 -1
include/scsi/scsi_device.h
··· 316 316 void scsi_attach_vpd(struct scsi_device *sdev); 317 317 318 318 extern struct scsi_device *scsi_device_from_queue(struct request_queue *q); 319 - extern int scsi_device_get(struct scsi_device *); 319 + extern int __must_check scsi_device_get(struct scsi_device *); 320 320 extern void scsi_device_put(struct scsi_device *); 321 321 extern struct scsi_device *scsi_device_lookup(struct Scsi_Host *, 322 322 uint, uint, u64);