Commit 80d904c4 authored by Jayachandran C's avatar Jayachandran C Committed by James Bottomley

[SCSI] sr: remove dead code

This patch fixes an issue reported in drivers/scsi/sr.c by Coverity

Error reported: Pointer returned from "scsi_cd" is never used

Patch description:
 Remove the scsi_cd() call as it does not have any effect.
Signed-off-by: default avatarJayachandran C. <c.jayachandran@gmail.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 46477226
...@@ -456,7 +456,7 @@ queue: ...@@ -456,7 +456,7 @@ queue:
static int sr_block_open(struct inode *inode, struct file *file) static int sr_block_open(struct inode *inode, struct file *file)
{ {
struct gendisk *disk = inode->i_bdev->bd_disk; struct gendisk *disk = inode->i_bdev->bd_disk;
struct scsi_cd *cd = scsi_cd(inode->i_bdev->bd_disk); struct scsi_cd *cd;
int ret = 0; int ret = 0;
if(!(cd = scsi_cd_get(disk))) if(!(cd = scsi_cd_get(disk)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment