diff
app_reply = kzalloc(size, GFP_KERNEL);
if (!app_reply) {
    SET_DID_STATUS(bsg_reply->result, DID_ERROR);
    rval = -1;
+   return rval;
}
+ if (app_reply) {
    struct fc_port	*fcport = NULL, *tf;

    app_reply->version = EDIF_VERSION1;

    list_for_each_entry_safe(fcport, tf, &vha->vp_fcports, list) {
        // ... (rest of the code)
    }
+ }
