From: Bart Van Assche Date: Wed, 5 Apr 2017 16:52:50 +0000 (-0700) Subject: scsi: Make checking the scsi_device_get() return value mandatory X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ed12e031b0deb0268cc6ed2d6c49dbcbec1cf038;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Hannes Reinecke Cc: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen --- diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 6f22b39f1b0c..d2a735ac482b 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -316,7 +316,7 @@ extern int scsi_unregister_device_handler(struct scsi_device_handler *scsi_dh); void scsi_attach_vpd(struct scsi_device *sdev); extern struct scsi_device *scsi_device_from_queue(struct request_queue *q); -extern int scsi_device_get(struct scsi_device *); +extern int __must_check scsi_device_get(struct scsi_device *); extern void scsi_device_put(struct scsi_device *); extern struct scsi_device *scsi_device_lookup(struct Scsi_Host *, uint, uint, u64);