From: Heiko Carstens Date: Mon, 23 May 2011 08:24:26 +0000 (+0200) Subject: [S390] dasd: fix return code handling X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=364c18d817a6beb3303e6b8f28ea37d9c06ff382;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [S390] dasd: fix return code handling Check return value of itcw_add_dcw() for error code and return it. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 58209434c99..30fb979d684 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c @@ -2552,8 +2552,7 @@ static int prepare_itcw(struct itcw *itcw, dcw = itcw_add_dcw(itcw, pfx_cmd, 0, &pfxdata, sizeof(pfxdata), total_data_size); - - return rc; + return IS_ERR(dcw) ? PTR_ERR(dcw) : 0; } static struct dasd_ccw_req *dasd_eckd_build_cp_tpm_track(