
147 Cal.App.3d 920 (1983)
195 Cal. Rptr. 461
JANET BUCK, Plaintiff and Appellant,
v.
CLAIRE BARB, Defendant and Appellant.
Docket No. AO18827.
Court of Appeals of California, First District, Division One.
October 11, 1983.
*922 COUNSEL
Robert S. Sturges, Caputo, Liccardo, Rossi, Sturges & McNeil and Janet Buck, in pro. per., for Plaintiff and Appellant.
Howard L. Hibbard and Hibbard & Hibbard for Defendant and Appellant.
OPINION
ELKINGTON, Acting P.J.
Plaintiff Buck has appealed, and defendant Barb has cross-appealed, from a judgment entered in plaintiff's action for declaratory relief and an injunction.
Having considered the record and the briefs and arguments of the respective parties we find no merit in the appeal of plaintiff. But as to the sole issue raised by defendant relating to her attorney's fees for services rendered in the action, we conclude that the judgment must be reversed. We now state our reasons.
*923 Much of the appeals is given over to discussion whether the trial court's factual determinations were supported by evidence. Applicable, we think, is the rule stated in Board of Education v. Jack M. (1977) 19 Cal.3d 691, 697 [139 Cal. Rptr. 700, 566 P.2d 602], as follows: (1) "Our sole task is to determine `whether the evidence, viewed in the light most favorable to [the judgment], sustains [these] findings.' ... Moreover, `in examining the sufficiency of the evidence to support a questioned finding an appellate court must accept as true all evidence tending to establish the correctness of the finding as made, taking into account, as well, all inferences which might reasonably have been thought by the trial court to lead to the same conclusion.' ... If appellate scrutiny reveals that substantial evidence supports the trial court's findings and conclusions, the judgment must be affirmed."
We accordingly narrate the relevant evidence as it tends to support the trial court's judgment.
Defendant Barb was an elderly widow who in 1976 sold her home in Boulder Creek, Santa Cruz County, to plaintiff Buck and one Douglas C. Wien. She took back as part of the purchase price the buyers' promissory note for $31,000, payable in installments of principal and interest of $300 per month. The promissory note contained a provision that: "If action be instituted on this note the undersigned promise to pay such sums as the court may adjudge as attorney's fees." (Our italics.) (At the time of the transaction plaintiff was a law student; she is now admitted to practice law.)
The promissory note was secured by a deed of trust on the real property of the transaction (the property). The deed of trust authorized its beneficiary (defendant Barb), to take such steps as were reasonable "to protect the security," "... and in exercising any such power, pay necessary expenses, employ counsel and pay his reasonable fees." The deed of trust then provided: "Trustor [plaintiff Buck and Wien] agrees ... to pay immediately and without demand all sums so expended by beneficiary. ..." It also stated: "To protect the security hereof, Trustor agrees: ... To provide, maintain and deliver to beneficiary fire insurance satisfactory to and with loss payable to beneficiary." (The italics of this paragraph is ours.)
Plaintiff Buck soon thereafter, by grant or judicial decree, became the sole owner of the property.
In 1980 or 1981 successive defaults occurred in the payments due under the promissory note and deed of trust. One or more of the payments made thereunder were by checks returned by the bank, marked "insufficient funds." And plaintiff did not deliver to defendant Barb, proof of fire insurance *924 on the property. Defendant was obliged to, and did, employ an attorney to protect her security interest in the property. Among other things, the attorney inquired about fire insurance. Receiving little or no information or cooperation from plaintiff, he wrote many letters and made many telephone calls which finally resulted in information that there was in fact, such outstanding insurance. And because of plaintiff's default on the promissory note and deed of trust, the attorney commenced foreclosure proceedings by causing to be filed a notice of default.
Plaintiff responded by bringing the instant action for declaratory relief and an injunction. By the action she sought a judicial declaration that she had done all things required, and paid all sums due, under the promissory note and deed of trust, that plaintiff was not obligated for defendant's attorney's fees incurred in protecting the security, and that any foreclosure sale under the deed of trust be enjoined.
Defendant's answer to the complaint, among other things, asserted plaintiff's default, sought attorney's fees for services in "protecting the security" before the action's commencement, and also, attorney's fees for services to be rendered in the instant and then pending action as provided by the promissory note.
Following a nonjury trial, the court in its statement of decision (see Code Civ. Proc., § 632) determined that plaintiff was in default at the time of commencement of her action, that defendant had reasonably and properly employed an attorney for "protection of the beneficiary's security interest," and that she acted reasonably in seeking proof of insurance through her attorney.
Judgment was thereupon entered "denying declaratory relief" and further, (1) denying plaintiff's request "for a declaration that she had not breached the written note and deed of trust," (2) declaring that plaintiff was obligated to defendant for $250 in attorney's fees for "protection of the security," and (3) declaring that "the preliminary restraining order herein against the pending foreclosure proceedings shall be terminated and dissolved."
Thereafter, by a separate order, attorney's fees to defendant for services rendered in the action (as distinguished from earlier services in "protecting the security") were denied by the trial court, because "there was no prevailing party."

Plaintiff Buck's Appeal
(2) Plaintiff principally contends that Civil Code section 2924c (q.v.) fixes the maximum fee payable to an attorney for "protecting the security" *925 at "fifty dollars ($50) in case of a deed of trust or one-half of 1 percent of the entire unpaid principal sum secured [here about $125] whichever is greater." The trial court, as pointed out, had allowed $250.
But here (as noted, p. 923, ante), the deed of trust expressly authorized its beneficiary (defendant) to "protect the security," and in doing so, to "employ counsel and pay his reasonable fees." It then required its "trustor (plaintiff) to pay immediately and without demand all sums so expended by beneficiary."
We are advised by plaintiff Buck that: "The law on this point is not settled in California. Writers have reasoned from Bisno v. Sax (1959) 175 CA2d 714 and O'Connor v. Richmond Sav. & Loan Assn. (1968) 262 CA2d 523 that the creditor can add attorney's fees incurred in protecting the security as authorized by the deed of trust language we have here. For example, the highly regarded C.E.B. work ..., California Real Estate Secured Transactions, p. 173, cites Bisno v. Sax as authority for the statement: `If the beneficiary has incurred additional attorney's fees for other services related to the deed of trust that are recoverable under the deed of trust, he may also be entitled to recover them from the trustor as a condition of reinstatement, if they are included in the notice of default.... In this instance, previously incurred attorney's fees are like any collateral advances made by the beneficiary, which may be added to his claim.'"
No contrary authority is proffered and we, ourselves, have found none. In our opinion, the C.E.B. work correctly states the applicable rule.
Nor is merit found in plaintiff's additional contention that the trial court's "Statement of Decision" is unsupported by the evidence. Applying the substantial evidence rule (see Board of Education v. Jack M., supra, 19 Cal.3d 691, 697), there was manifestly such evidence. It is of no consequence that the trial court, believing other evidence or drawing other inferences, might have come to a contrary conclusion.

Defendant Barb's Appeal
It will be remembered that by contract, i.e., the promissory note, plaintiff had promised to pay defendant's attorney's fees "if action be instituted on this note." By virtue of Civil Code section 1717 that provision operated reciprocally, regardless of which party commenced the action.
(3) The issue is whether defendant Barb was the prevailing party of the action.
*926 The judgment here under appeal, expressly "denying declaratory relief" to the plaintiff, declaring that she had been in default, and was obligated to pay defendant's reasonable attorney's fees for services "in protecting the security," found in defendant's favor on all issues of the action. She was patently the action's prevailing party.
We note further that Civil Code section 1717, as in effect now and at the action's trial, provides that "the prevailing party shall be the party who is entitled to recover costs of suit." Here defendant was entitled to recover her costs, and the judgment expressly so declared.
And: "The purpose of upholding an attorney's fees provision in a promissory note is to allow a plaintiff to recover the full amount due him without such amount being diminished by attorney's fees." (Wiener v. Van Winkle (1969) 273 Cal. App.2d 774, 788 [78 Cal. Rptr. 761].)
We are unpersuaded that because the trial court allowed defendant $250 on her claim for $420 in attorney's fees for "protecting the security," it had somehow made plaintiff, who had denied any such obligation, the "prevailing party." The fact that a party's recovery in an action under a contract is less than the amount he prayed for does not make his adversary the prevailing party within the meaning of Civil Code section 1717. (Sukut-Coulson, Inc. v. Allied Canon Co. (1978) 85 Cal. App.3d 648, 650, 656 [149 Cal. Rptr. 711].)
The superior court will modify the judgment by fixing and awarding defendant her reasonable attorney's fees for services rendered in the action, including this appeal. As so modified, the judgment is affirmed.
Newsom, J., and Holmdahl, J., concurred.
A petition for a rehearing was denied November 8, 1983, and on November 16, 1983, the opinion was modified to read as printed above. The petition of plaintiff and appellant for a hearing by the Supreme Court was denied December 28, 1983.
