Re: [PATCH] sd: Free the page in case of unknown provisioning_mode in scsi_setup_discard_cmnd.
From: Jeff Moyer
Date: Tue Mar 22 2011 - 08:58:02 EST
Tao Ma <tm@xxxxxx> writes:
> From: Tao Ma <boyu.mt@xxxxxxxxxx>
> This patch is inspired by a build waring.
> drivers/scsi/sd.c:544: warning: âretâ may be used uninitialized in this function
> So we need to set a default value to ret here.
> But a deep look at scsi_setup_discard_cmnd makes me think
> of which value should be set. Now we have BLKPREP_KILL and
> BLKPREP_DEFER to indicate an error. As in case of an
> unknown sdkp->provisioning_mode, we goto out directly. So
> I guess we should return BLKPREP_KILL here and free the page.
Yeah, there's no point in deferring it.
Reviewed-by: Jeff Moyer <jmoyer@xxxxxxxxxx>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/